From 561a847bd79a4f4789318c659846a37f34b79175 Mon Sep 17 00:00:00 2001
From: Aravinth Manivannan <realaravinth@batsense.net>
Date: Tue, 17 Oct 2023 01:03:46 +0530
Subject: [PATCH 1/4] chore: use libmcaptcha and libcachebust from crates.io

---
 .gitignore                       |   2 +
 Cargo.lock                       | 178 ++++++++++++++++++++++---------
 Cargo.toml                       |   5 +-
 db/db-core/Cargo.toml            |   2 +-
 src/date.rs                      |   7 +-
 src/pages/mod.rs                 |   6 +-
 src/pages/panel/notifications.rs |  13 ++-
 src/static_assets/filemap.rs     |   2 +-
 utils/cache-bust/Cargo.lock      | 173 ++++++++++++++++--------------
 utils/cache-bust/Cargo.toml      |   2 +-
 utils/cache-bust/src/main.rs     |   2 +-
 11 files changed, 245 insertions(+), 147 deletions(-)

diff --git a/.gitignore b/.gitignore
index 43270457..461f572a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,5 @@ assets
 yarn-error.log
 src/cache_buster_data.json.license
 **/**/target
+src/libcachebust_data.json
+utils/cache-bust/src/libcachebust_data.json
diff --git a/Cargo.lock b/Cargo.lock
index 905832ee..6ded38ac 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -101,7 +101,7 @@ dependencies = [
  "percent-encoding",
  "pin-project-lite",
  "rand",
- "sha1 0.10.5",
+ "sha1",
  "smallvec",
  "tokio",
  "tokio-util",
@@ -641,21 +641,6 @@ dependencies = [
  "bytes",
 ]
 
-[[package]]
-name = "cache-buster"
-version = "0.2.0"
-source = "git+https://github.com/realaravinth/cache-buster#7ca4545722fb99be30698a5e72c7d982a70fa11f"
-dependencies = [
- "data-encoding",
- "derive_builder 0.11.1",
- "mime",
- "mime_guess",
- "serde",
- "serde_json",
- "sha2",
- "walkdir",
-]
-
 [[package]]
 name = "cc"
 version = "1.0.79"
@@ -1125,7 +1110,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
 dependencies = [
  "atty",
- "humantime",
+ "humantime 1.3.0",
+ "log",
+ "regex",
+ "termcolor",
+]
+
+[[package]]
+name = "env_logger"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
+dependencies = [
+ "humantime 2.1.0",
+ "is-terminal",
  "log",
  "regex",
  "termcolor",
@@ -1555,6 +1553,12 @@ dependencies = [
  "quick-error",
 ]
 
+[[package]]
+name = "humantime"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
+
 [[package]]
 name = "ident_case"
 version = "1.0.1"
@@ -1647,6 +1651,17 @@ dependencies = [
  "windows-sys 0.48.0",
 ]
 
+[[package]]
+name = "is-terminal"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b"
+dependencies = [
+ "hermit-abi 0.3.1",
+ "rustix 0.38.13",
+ "windows-sys 0.48.0",
+]
+
 [[package]]
 name = "itertools"
 version = "0.11.0"
@@ -1744,6 +1759,22 @@ version = "0.2.147"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
 
+[[package]]
+name = "libcachebust"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e65010b256a3c85a90e88212d3e360d2ac15643d087878f09837ba6b2c83c120"
+dependencies = [
+ "data-encoding",
+ "derive_builder 0.12.0",
+ "mime",
+ "mime_guess",
+ "serde",
+ "serde_json",
+ "sha2",
+ "walkdir",
+]
+
 [[package]]
 name = "libm"
 version = "0.2.7"
@@ -1752,17 +1783,17 @@ checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4"
 
 [[package]]
 name = "libmcaptcha"
-version = "0.2.3"
-source = "git+https://github.com/mCaptcha/libmcaptcha?tag=0.2.3#6bc0d11f8839d18c4d930cac0c0b86505ed1b2f6"
+version = "0.2.4"
+source = "git+https://github.com/mCaptcha/libmcaptcha?tag=0.2.4#681a5c6380373440f56f4c0bda2ffac5654df773"
 dependencies = [
  "actix",
  "crossbeam-channel",
- "derive_builder 0.11.1",
+ "derive_builder 0.12.0",
  "derive_more",
  "log",
+ "mcaptcha_pow_sha256",
  "num_cpus",
- "pow_sha256",
- "pretty_env_logger",
+ "pretty_env_logger 0.5.0",
  "rand",
  "redis",
  "serde",
@@ -1793,6 +1824,12 @@ version = "0.3.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
 
+[[package]]
+name = "linux-raw-sys"
+version = "0.4.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f"
+
 [[package]]
 name = "local-channel"
 version = "0.1.3"
@@ -1881,7 +1918,6 @@ dependencies = [
  "argon2-creds",
  "async-trait",
  "awc",
- "cache-buster",
  "config",
  "db-core",
  "db-sqlx-maria",
@@ -1891,6 +1927,7 @@ dependencies = [
  "futures",
  "lazy_static",
  "lettre",
+ "libcachebust",
  "libmcaptcha",
  "log",
  "mcaptcha_pow_sha256",
@@ -1898,7 +1935,7 @@ dependencies = [
  "mime_guess",
  "num_cpus",
  "openssl",
- "pretty_env_logger",
+ "pretty_env_logger 0.4.0",
  "rand",
  "rust-embed",
  "sailfish",
@@ -2341,6 +2378,26 @@ dependencies = [
  "siphasher",
 ]
 
+[[package]]
+name = "pin-project"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422"
+dependencies = [
+ "pin-project-internal",
+]
+
+[[package]]
+name = "pin-project-internal"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.38",
+]
+
 [[package]]
 name = "pin-project-lite"
 version = "0.2.10"
@@ -2392,18 +2449,6 @@ dependencies = [
  "universal-hash",
 ]
 
-[[package]]
-name = "pow_sha256"
-version = "0.3.1"
-source = "git+https://github.com/mcaptcha/pow_sha256#148f1cb70d19114d1340661a77b2b679e95715f6"
-dependencies = [
- "bincode",
- "derive_builder 0.11.1",
- "num",
- "serde",
- "sha2",
-]
-
 [[package]]
 name = "ppv-lite86"
 version = "0.2.17"
@@ -2422,7 +2467,17 @@ version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "926d36b9553851b8b0005f1275891b392ee4d2d833852c417ed025477350fb9d"
 dependencies = [
- "env_logger",
+ "env_logger 0.7.1",
+ "log",
+]
+
+[[package]]
+name = "pretty_env_logger"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "865724d4dbe39d9f3dd3b52b88d859d66bcb2d6a0acfd5ea68a65fb66d4bdc1c"
+dependencies = [
+ "env_logger 0.10.0",
  "log",
 ]
 
@@ -2523,9 +2578,9 @@ dependencies = [
 
 [[package]]
 name = "redis"
-version = "0.21.7"
+version = "0.23.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "152f3863635cbb76b73bc247845781098302c6c9ad2060e1a9a7de56840346b6"
+checksum = "4f49cdc0bb3f412bf8e7d1bd90fe1d9eb10bc5c399ba90973c14662a27b3f8ba"
 dependencies = [
  "arc-swap",
  "async-trait",
@@ -2540,8 +2595,10 @@ dependencies = [
  "r2d2",
  "rand",
  "ryu",
- "sha1 0.6.1",
+ "sha1_smol",
+ "socket2",
  "tokio",
+ "tokio-retry",
  "tokio-util",
  "url",
 ]
@@ -2710,7 +2767,20 @@ dependencies = [
  "errno",
  "io-lifetimes",
  "libc",
- "linux-raw-sys",
+ "linux-raw-sys 0.3.8",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "rustix"
+version = "0.38.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662"
+dependencies = [
+ "bitflags 2.4.1",
+ "errno",
+ "libc",
+ "linux-raw-sys 0.4.10",
  "windows-sys 0.48.0",
 ]
 
@@ -2912,15 +2982,6 @@ dependencies = [
  "serde",
 ]
 
-[[package]]
-name = "sha1"
-version = "0.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770"
-dependencies = [
- "sha1_smol",
-]
-
 [[package]]
 name = "sha1"
 version = "0.10.5"
@@ -3163,7 +3224,7 @@ dependencies = [
  "rand",
  "rsa",
  "serde",
- "sha1 0.10.5",
+ "sha1",
  "sha2",
  "smallvec",
  "sqlx-core",
@@ -3203,7 +3264,7 @@ dependencies = [
  "rand",
  "serde",
  "serde_json",
- "sha1 0.10.5",
+ "sha1",
  "sha2",
  "smallvec",
  "sqlx-core",
@@ -3317,7 +3378,7 @@ dependencies = [
  "cfg-if",
  "fastrand",
  "redox_syscall 0.3.5",
- "rustix",
+ "rustix 0.37.21",
  "windows-sys 0.48.0",
 ]
 
@@ -3431,6 +3492,17 @@ dependencies = [
  "tokio",
 ]
 
+[[package]]
+name = "tokio-retry"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f"
+dependencies = [
+ "pin-project",
+ "rand",
+ "tokio",
+]
+
 [[package]]
 name = "tokio-stream"
 version = "0.1.14"
diff --git a/Cargo.toml b/Cargo.toml
index 1fe2c08f..ad33aa8e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -33,7 +33,7 @@ actix-service = "2.0.0"
 async-trait = "0.1.51"
 mime_guess = "2.0.3"
 rust-embed = "6.4.0"
-cache-buster = { git = "https://github.com/realaravinth/cache-buster" }
+libcachebust = "0.3.0"
 
 futures = "0.3.15"
 tokio = { version = "1.14", features = ["sync"]}
@@ -59,8 +59,7 @@ log = "0.4"
 lazy_static = "1.4"
 
 
-libmcaptcha = { version = "0.2.3", git = "https://github.com/mCaptcha/libmcaptcha", features = ["full"], tag ="0.2.3" }
-#libmcaptcha = { branch = "master", git = "https://github.com/mCaptcha/libmcaptcha", features = ["full"] }
+libmcaptcha = { tag = "0.2.4", git = "https://github.com/mCaptcha/libmcaptcha", features = ["full"] }
 #libmcaptcha = { path = "../libmcaptcha", features = ["full"]}
 
 rand = "0.8"
diff --git a/db/db-core/Cargo.toml b/db/db-core/Cargo.toml
index 9b62a7ea..ab6156ad 100644
--- a/db/db-core/Cargo.toml
+++ b/db/db-core/Cargo.toml
@@ -13,7 +13,7 @@ async-trait = "0.1.51"
 thiserror = "1.0.30"
 serde = { version = "1", features = ["derive"]}
 url = { version  = "2.2.2", features = ["serde"] }
-libmcaptcha = {  version = "0.2.3", git = "https://github.com/mCaptcha/libmcaptcha", features = ["minimal"], default-features = false, tag = "0.2.3"}
+libmcaptcha = {  version = "0.2.4", git = "https://github.com/mCaptcha/libmcaptcha", features = ["minimal"], default-features = false, tag = "0.2.4"}
 #libmcaptcha = { branch = "master", git = "https://github.com/mCaptcha/libmcaptcha", features = ["full"] }
 
 [features]
diff --git a/src/date.rs b/src/date.rs
index ce6ef55c..f0dfab07 100644
--- a/src/date.rs
+++ b/src/date.rs
@@ -52,7 +52,12 @@ impl Date {
 
     /// print date
     pub fn date(&self) -> String {
-            format!("{}{}{}", self.time.year(), self.time.month(), self.time.date())
+        format!(
+            "{}{}{}",
+            self.time.year(),
+            self.time.month(),
+            self.time.date()
+        )
     }
 
     pub fn new(unix: i64) -> Self {
diff --git a/src/pages/mod.rs b/src/pages/mod.rs
index a57887c0..7377be71 100644
--- a/src/pages/mod.rs
+++ b/src/pages/mod.rs
@@ -63,7 +63,8 @@ mod tests {
 
         let edit_sitekey_url = PAGES.panel.sitekey.get_edit_advance(&token_key.key);
         let delete_sitekey_url = PAGES.panel.sitekey.get_delete(&token_key.key);
-        let urls = [PAGES.home,
+        let urls = [
+            PAGES.home,
             PAGES.panel.sitekey.add_advance,
             PAGES.panel.sitekey.add_easy,
             PAGES.panel.sitekey.list,
@@ -72,7 +73,8 @@ mod tests {
             PAGES.panel.settings.delete_account,
             PAGES.panel.settings.update_secret,
             &delete_sitekey_url,
-            &edit_sitekey_url];
+            &edit_sitekey_url,
+        ];
 
         for url in urls.iter() {
             let resp =
diff --git a/src/pages/panel/notifications.rs b/src/pages/panel/notifications.rs
index 0c118dc3..f1ed3d42 100644
--- a/src/pages/panel/notifications.rs
+++ b/src/pages/panel/notifications.rs
@@ -95,9 +95,11 @@ mod tests {
         assert!(n.print_date().contains("seconds ago"));
 
         // minutes test
-        n.received = OffsetDateTime::from_unix_timestamp(timestamp - MINUTE * 2).unwrap();
+        n.received =
+            OffsetDateTime::from_unix_timestamp(timestamp - MINUTE * 2).unwrap();
         assert!(n.print_date().contains("minutes ago"));
-        n.received = OffsetDateTime::from_unix_timestamp(timestamp - MINUTE * 56).unwrap();
+        n.received =
+            OffsetDateTime::from_unix_timestamp(timestamp - MINUTE * 56).unwrap();
         assert!(n.print_date().contains("minutes ago"));
 
         // hours test
@@ -112,7 +114,12 @@ mod tests {
 
         // date test
         n.received = OffsetDateTime::from_unix_timestamp(timestamp - 6 * WEEK).unwrap();
-        let date = format!("{}{}{}", n.received.year(), n.received.month(), n.received.date());
+        let date = format!(
+            "{}{}{}",
+            n.received.year(),
+            n.received.month(),
+            n.received.date()
+        );
         assert!(n.print_date().contains(&date))
     }
 }
diff --git a/src/static_assets/filemap.rs b/src/static_assets/filemap.rs
index e00c3007..065284dc 100644
--- a/src/static_assets/filemap.rs
+++ b/src/static_assets/filemap.rs
@@ -3,7 +3,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0-or-later
 
-use cache_buster::Files;
+use libcachebust::Files;
 
 pub struct FileMap {
     pub files: Files,
diff --git a/utils/cache-bust/Cargo.lock b/utils/cache-bust/Cargo.lock
index c83f24e6..7a982757 100644
--- a/utils/cache-bust/Cargo.lock
+++ b/utils/cache-bust/Cargo.lock
@@ -4,9 +4,9 @@ version = 3
 
 [[package]]
 name = "block-buffer"
-version = "0.10.2"
+version = "0.10.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324"
+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
 dependencies = [
  "generic-array",
 ]
@@ -15,26 +15,11 @@ dependencies = [
 name = "cache-bust"
 version = "0.1.0"
 dependencies = [
- "cache-buster",
+ "libcachebust",
  "serde",
  "serde_json",
 ]
 
-[[package]]
-name = "cache-buster"
-version = "0.2.0"
-source = "git+https://github.com/realaravinth/cache-buster#7ca4545722fb99be30698a5e72c7d982a70fa11f"
-dependencies = [
- "data-encoding",
- "derive_builder",
- "mime",
- "mime_guess",
- "serde",
- "serde_json",
- "sha2",
- "walkdir",
-]
-
 [[package]]
 name = "cfg-if"
 version = "1.0.0"
@@ -43,18 +28,18 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
 
 [[package]]
 name = "cpufeatures"
-version = "0.2.2"
+version = "0.2.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b"
+checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1"
 dependencies = [
  "libc",
 ]
 
 [[package]]
 name = "crypto-common"
-version = "0.1.3"
+version = "0.1.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8"
+checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
 dependencies = [
  "generic-array",
  "typenum",
@@ -62,9 +47,9 @@ dependencies = [
 
 [[package]]
 name = "darling"
-version = "0.14.1"
+version = "0.14.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4529658bdda7fd6769b8614be250cdcfc3aeb0ee72fe66f9e41e5e5eb73eac02"
+checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850"
 dependencies = [
  "darling_core",
  "darling_macro",
@@ -72,71 +57,71 @@ dependencies = [
 
 [[package]]
 name = "darling_core"
-version = "0.14.1"
+version = "0.14.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "649c91bc01e8b1eac09fb91e8dbc7d517684ca6be8ebc75bb9cafc894f9fdb6f"
+checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0"
 dependencies = [
  "fnv",
  "ident_case",
  "proc-macro2",
  "quote",
  "strsim",
- "syn",
+ "syn 1.0.109",
 ]
 
 [[package]]
 name = "darling_macro"
-version = "0.14.1"
+version = "0.14.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ddfc69c5bfcbd2fc09a0f38451d2daf0e372e367986a83906d1b0dbc88134fb5"
+checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e"
 dependencies = [
  "darling_core",
  "quote",
- "syn",
+ "syn 1.0.109",
 ]
 
 [[package]]
 name = "data-encoding"
-version = "2.3.2"
+version = "2.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57"
+checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
 
 [[package]]
 name = "derive_builder"
-version = "0.11.2"
+version = "0.12.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3"
+checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8"
 dependencies = [
  "derive_builder_macro",
 ]
 
 [[package]]
 name = "derive_builder_core"
-version = "0.11.2"
+version = "0.12.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4"
+checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f"
 dependencies = [
  "darling",
  "proc-macro2",
  "quote",
- "syn",
+ "syn 1.0.109",
 ]
 
 [[package]]
 name = "derive_builder_macro"
-version = "0.11.2"
+version = "0.12.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68"
+checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e"
 dependencies = [
  "derive_builder_core",
- "syn",
+ "syn 1.0.109",
 ]
 
 [[package]]
 name = "digest"
-version = "0.10.3"
+version = "0.10.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506"
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
 dependencies = [
  "block-buffer",
  "crypto-common",
@@ -150,9 +135,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
 
 [[package]]
 name = "generic-array"
-version = "0.14.5"
+version = "0.14.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803"
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
 dependencies = [
  "typenum",
  "version_check",
@@ -166,21 +151,37 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
 
 [[package]]
 name = "itoa"
-version = "1.0.1"
+version = "1.0.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
+checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
 
 [[package]]
 name = "libc"
-version = "0.2.125"
+version = "0.2.149"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b"
+checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b"
+
+[[package]]
+name = "libcachebust"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e65010b256a3c85a90e88212d3e360d2ac15643d087878f09837ba6b2c83c120"
+dependencies = [
+ "data-encoding",
+ "derive_builder",
+ "mime",
+ "mime_guess",
+ "serde",
+ "serde_json",
+ "sha2",
+ "walkdir",
+]
 
 [[package]]
 name = "mime"
-version = "0.3.16"
+version = "0.3.17"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
+checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
 
 [[package]]
 name = "mime_guess"
@@ -194,27 +195,27 @@ dependencies = [
 
 [[package]]
 name = "proc-macro2"
-version = "1.0.38"
+version = "1.0.69"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9027b48e9d4c9175fa2218adf3557f91c1137021739951d4932f5f8268ac48aa"
+checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
 dependencies = [
- "unicode-xid",
+ "unicode-ident",
 ]
 
 [[package]]
 name = "quote"
-version = "1.0.18"
+version = "1.0.33"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
+checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
 dependencies = [
  "proc-macro2",
 ]
 
 [[package]]
 name = "ryu"
-version = "1.0.9"
+version = "1.0.15"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"
+checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
 
 [[package]]
 name = "same-file"
@@ -227,29 +228,29 @@ dependencies = [
 
 [[package]]
 name = "serde"
-version = "1.0.137"
+version = "1.0.189"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1"
+checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537"
 dependencies = [
  "serde_derive",
 ]
 
 [[package]]
 name = "serde_derive"
-version = "1.0.137"
+version = "1.0.189"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be"
+checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn",
+ "syn 2.0.38",
 ]
 
 [[package]]
 name = "serde_json"
-version = "1.0.81"
+version = "1.0.107"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c"
+checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65"
 dependencies = [
  "itoa",
  "ryu",
@@ -258,9 +259,9 @@ dependencies = [
 
 [[package]]
 name = "sha2"
-version = "0.10.2"
+version = "0.10.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676"
+checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
 dependencies = [
  "cfg-if",
  "cpufeatures",
@@ -275,35 +276,46 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
 
 [[package]]
 name = "syn"
-version = "1.0.94"
+version = "1.0.109"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a07e33e919ebcd69113d5be0e4d70c5707004ff45188910106854f38b960df4a"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
 dependencies = [
  "proc-macro2",
  "quote",
- "unicode-xid",
+ "unicode-ident",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.38"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
 ]
 
 [[package]]
 name = "typenum"
-version = "1.15.0"
+version = "1.17.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
+checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
 
 [[package]]
 name = "unicase"
-version = "2.6.0"
+version = "2.7.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"
+checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89"
 dependencies = [
  "version_check",
 ]
 
 [[package]]
-name = "unicode-xid"
-version = "0.2.3"
+name = "unicode-ident"
+version = "1.0.12"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04"
+checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
 
 [[package]]
 name = "version_check"
@@ -313,12 +325,11 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
 
 [[package]]
 name = "walkdir"
-version = "2.3.2"
+version = "2.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56"
+checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee"
 dependencies = [
  "same-file",
- "winapi",
  "winapi-util",
 ]
 
@@ -340,9 +351,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
 
 [[package]]
 name = "winapi-util"
-version = "0.1.5"
+version = "0.1.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
+checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"
 dependencies = [
  "winapi",
 ]
diff --git a/utils/cache-bust/Cargo.toml b/utils/cache-bust/Cargo.toml
index fe6fddbb..b43e8e61 100644
--- a/utils/cache-bust/Cargo.toml
+++ b/utils/cache-bust/Cargo.toml
@@ -12,6 +12,6 @@ authors = ["realaravinth <realaravinth@batsense.net>"]
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
 [dependencies]
-cache-buster = { version = "0.2.0", git = "https://github.com/realaravinth/cache-buster" }
+libcachebust = "0.3.0"
 serde = { version = "1", features  = ["derive"] }
 serde_json = "1"
diff --git a/utils/cache-bust/src/main.rs b/utils/cache-bust/src/main.rs
index 7eb78794..44a790e2 100644
--- a/utils/cache-bust/src/main.rs
+++ b/utils/cache-bust/src/main.rs
@@ -7,7 +7,7 @@ use std::fs;
 use std::path::Path;
 use std::collections::HashMap;
 
-use cache_buster::{BusterBuilder, CACHE_BUSTER_DATA_FILE, NoHashCategory};
+use libcachebust::{BusterBuilder, CACHE_BUSTER_DATA_FILE, NoHashCategory};
 use serde::{Serialize, Deserialize};
 
 #[derive(Deserialize, Serialize)]

From cb7245d57716ed274e485b6794fd106c450f9858 Mon Sep 17 00:00:00 2001
From: Aravinth Manivannan <realaravinth@batsense.net>
Date: Tue, 17 Oct 2023 15:38:40 +0530
Subject: [PATCH 2/4] feat: use libmCaptcha from crates.io

---
 Cargo.lock            | 3 ++-
 Cargo.toml            | 3 +--
 db/db-core/Cargo.toml | 3 +--
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index 6ded38ac..63a20634 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1784,7 +1784,8 @@ checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4"
 [[package]]
 name = "libmcaptcha"
 version = "0.2.4"
-source = "git+https://github.com/mCaptcha/libmcaptcha?tag=0.2.4#681a5c6380373440f56f4c0bda2ffac5654df773"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3bd24de3df9ea98d75d929dc4df5d637832213d3deb61d2cfa5c9055ccdaea6b"
 dependencies = [
  "actix",
  "crossbeam-channel",
diff --git a/Cargo.toml b/Cargo.toml
index ad33aa8e..66efa6c5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -59,8 +59,7 @@ log = "0.4"
 lazy_static = "1.4"
 
 
-libmcaptcha = { tag = "0.2.4", git = "https://github.com/mCaptcha/libmcaptcha", features = ["full"] }
-#libmcaptcha = { path = "../libmcaptcha", features = ["full"]}
+libmcaptcha = "0.2.4"
 
 rand = "0.8"
 
diff --git a/db/db-core/Cargo.toml b/db/db-core/Cargo.toml
index ab6156ad..72561de7 100644
--- a/db/db-core/Cargo.toml
+++ b/db/db-core/Cargo.toml
@@ -13,8 +13,7 @@ async-trait = "0.1.51"
 thiserror = "1.0.30"
 serde = { version = "1", features = ["derive"]}
 url = { version  = "2.2.2", features = ["serde"] }
-libmcaptcha = {  version = "0.2.4", git = "https://github.com/mCaptcha/libmcaptcha", features = ["minimal"], default-features = false, tag = "0.2.4"}
-#libmcaptcha = { branch = "master", git = "https://github.com/mCaptcha/libmcaptcha", features = ["full"] }
+libmcaptcha = "0.2.4"
 
 [features]
 default = []

From c67b7ac686f483b667584f829deea27fc423685f Mon Sep 17 00:00:00 2001
From: Aravinth Manivannan <realaravinth@batsense.net>
Date: Tue, 17 Oct 2023 15:47:15 +0530
Subject: [PATCH 3/4] fix: cache busting metadata is stored in
 libcachebust_data.json

---
 Makefile                     | 2 +-
 src/static_assets/filemap.rs | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index ec966c18..605afae1 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
 
 BUNDLE = static/cache/bundle
 OPENAPI = docs/openapi
-CLEAN_UP = $(BUNDLE) src/cache_buster_data.json assets
+CLEAN_UP = $(BUNDLE) src/libcachebust_data.json assets
 
 define deploy_dependencies ## deploy dependencies
 	@-docker create --name ${db}  \
diff --git a/src/static_assets/filemap.rs b/src/static_assets/filemap.rs
index 065284dc..60942269 100644
--- a/src/static_assets/filemap.rs
+++ b/src/static_assets/filemap.rs
@@ -12,7 +12,7 @@ pub struct FileMap {
 impl FileMap {
     #[allow(clippy::new_without_default)]
     pub fn new() -> Self {
-        let map = include_str!("../cache_buster_data.json");
+        let map = include_str!("../libcachebust_data.json");
         let files = Files::new(map);
         Self { files }
     }

From 8e3fb9d8ec05a4f3c9213134df8fe745741910ed Mon Sep 17 00:00:00 2001
From: Aravinth Manivannan <realaravinth@batsense.net>
Date: Tue, 17 Oct 2023 16:14:06 +0530
Subject: [PATCH 4/4] hotfix: disable uploads to dl.mcaptcha.org

---
 .github/workflows/linux.yml | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
index 27d7222b..47e9ab55 100644
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -129,12 +129,12 @@ jobs:
         if: (github.ref == 'refs/heads/master' || github.event_name == 'push') && github.repository == 'mCaptcha/mCaptcha'
         run: make docker-publish
 
-      - name: publish bins
-        if: (github.ref == 'refs/heads/master' || github.event_name == 'push') && github.repository == 'mCaptcha/mCaptcha'
-        run: ./scripts/publish.sh publish master latest $DUMBSERVE_PASSWORD
-        env:
-          DUMBSERVE_PASSWORD: ${{ secrets.DUMBSERVE_PASSWORD }}
-          GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
+          #      - name: publish bins
+          #        if: (github.ref == 'refs/heads/master' || github.event_name == 'push') && github.repository == 'mCaptcha/mCaptcha'
+          #        run: ./scripts/publish.sh publish master latest $DUMBSERVE_PASSWORD
+          #        env:
+          #          DUMBSERVE_PASSWORD: ${{ secrets.DUMBSERVE_PASSWORD }}
+          #          GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
 
       - name: generate documentation
         if: matrix.version == 'stable' && (github.repository == 'mCaptcha/mCaptcha')