chore: use libmcaptcha and libcachebust from crates.io

This commit is contained in:
Aravinth Manivannan
2023-10-17 01:03:46 +05:30
parent 9e77eec657
commit 561a847bd7
11 changed files with 245 additions and 147 deletions

178
Cargo.lock generated
View File

@@ -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"