0
0
mirror of https://github.com/neon-mmd/websurfx.git synced 2024-12-22 20:38:22 -05:00

Merge pull request #386 from SaranaDheeraj/rolling

🔒️ More secure hashing algorithm like `BLAKE3` instead of `md5` hashing algorithm
This commit is contained in:
alamin655 2023-11-20 21:42:39 +05:30 committed by GitHub
commit 9bb1544bd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 201 additions and 143 deletions

336
Cargo.lock generated
View File

@ -14,7 +14,7 @@ dependencies = [
"futures-sink",
"memchr",
"pin-project-lite",
"tokio 1.34.0",
"tokio 1.33.0",
"tokio-util",
"tracing",
]
@ -31,7 +31,7 @@ dependencies = [
"futures-util",
"log",
"once_cell",
"smallvec 1.11.2",
"smallvec 1.11.1",
]
[[package]]
@ -87,7 +87,7 @@ dependencies = [
"derive_more",
"encoding_rs",
"futures-core",
"http 0.2.11",
"http 0.2.9",
"httparse",
"httpdate",
"itoa 1.0.9",
@ -98,8 +98,8 @@ dependencies = [
"pin-project-lite",
"rand 0.8.5",
"sha1",
"smallvec 1.11.2",
"tokio 1.34.0",
"smallvec 1.11.1",
"tokio 1.33.0",
"tokio-util",
"tracing",
]
@ -121,7 +121,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d66ff4d247d2b160861fa2866457e85706833527840e4133f8f49aa423a38799"
dependencies = [
"bytestring",
"http 0.2.11",
"http 0.2.9",
"regex",
"serde",
"tracing",
@ -134,7 +134,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28f32d40287d3f402ae0028a9d54bef51af15c8769492826a69d28f81893151d"
dependencies = [
"futures-core",
"tokio 1.34.0",
"tokio 1.33.0",
]
[[package]]
@ -150,7 +150,7 @@ dependencies = [
"futures-util",
"mio 0.8.9",
"socket2 0.5.5",
"tokio 1.34.0",
"tokio 1.33.0",
"tracing",
]
@ -209,7 +209,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded 0.7.1",
"smallvec 1.11.2",
"smallvec 1.11.1",
"socket2 0.5.5",
"time 0.3.30",
"url 2.4.1",
@ -323,6 +323,18 @@ version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6"
[[package]]
name = "arrayref"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545"
[[package]]
name = "arrayvec"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
[[package]]
name = "askama_escape"
version = "0.10.3"
@ -432,6 +444,19 @@ version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07"
[[package]]
name = "blake3"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87"
dependencies = [
"arrayref",
"arrayvec",
"cc",
"cfg-if 1.0.0",
"constant_time_eq",
]
[[package]]
name = "block-buffer"
version = "0.10.4"
@ -464,9 +489,9 @@ dependencies = [
[[package]]
name = "bstr"
version = "1.8.0"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c"
checksum = "c79ad7fb2dd38f3dabd76b09c6a5a20c038fc0213ef1e9afd30eb777f120f019"
dependencies = [
"memchr",
"serde",
@ -612,18 +637,18 @@ dependencies = [
[[package]]
name = "clap"
version = "4.4.8"
version = "4.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2275f18819641850fa26c89acc84d465c1bf91ce57bc2748b28c420473352f64"
checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b"
dependencies = [
"clap_builder",
]
[[package]]
name = "clap_builder"
version = "4.4.8"
version = "4.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07cdf1b148b25c1e1f7a42225e30a0d99a615cd4637eae7365548dd4529b95bc"
checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663"
dependencies = [
"anstyle",
"clap_lex",
@ -654,7 +679,7 @@ dependencies = [
"futures-core",
"memchr",
"pin-project-lite",
"tokio 1.34.0",
"tokio 1.33.0",
"tokio-util",
]
@ -678,6 +703,12 @@ dependencies = [
"syn 1.0.109",
]
[[package]]
name = "constant_time_eq"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2"
[[package]]
name = "convert_case"
version = "0.4.0"
@ -878,7 +909,7 @@ dependencies = [
"dtoa-short",
"itoa 1.0.9",
"phf 0.11.2",
"smallvec 1.11.2",
"smallvec 1.11.1",
]
[[package]]
@ -891,7 +922,7 @@ dependencies = [
"dtoa-short",
"itoa 1.0.9",
"phf 0.11.2",
"smallvec 1.11.2",
"smallvec 1.11.1",
]
[[package]]
@ -1024,9 +1055,9 @@ dependencies = [
[[package]]
name = "env_logger"
version = "0.10.1"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece"
checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
dependencies = [
"log",
]
@ -1038,20 +1069,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2d328fc287c61314c4a61af7cfdcbd7e678e39778488c7cb13ec133ce0f4059"
dependencies = [
"fsio",
"indexmap 1.9.3",
"indexmap",
]
[[package]]
name = "equivalent"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
[[package]]
name = "errno"
version = "0.3.7"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8"
checksum = "7c18ee0ed65a5f1f81cac6b1d213b69c35fa47d4252ad41f1486dbd8226fe36e"
dependencies = [
"libc",
"windows-sys",
@ -1370,7 +1395,7 @@ dependencies = [
"parking_lot 0.12.1",
"quanta",
"rand 0.8.5",
"smallvec 1.11.2",
"smallvec 1.11.1",
]
[[package]]
@ -1384,7 +1409,7 @@ dependencies = [
"fnv",
"futures 0.1.31",
"http 0.1.21",
"indexmap 1.9.3",
"indexmap",
"log",
"slab",
"string",
@ -1393,19 +1418,19 @@ dependencies = [
[[package]]
name = "h2"
version = "0.3.22"
version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178"
checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833"
dependencies = [
"bytes 1.5.0",
"fnv",
"futures-core",
"futures-sink",
"futures-util",
"http 0.2.11",
"indexmap 2.1.0",
"http 0.2.9",
"indexmap",
"slab",
"tokio 1.34.0",
"tokio 1.33.0",
"tokio-util",
"tracing",
]
@ -1416,6 +1441,21 @@ version = "1.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
[[package]]
name = "handlebars"
version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c39b3bc2a8f715298032cf5087e58573809374b08160aa7d750582bdb82d2683"
dependencies = [
"log",
"pest",
"pest_derive",
"serde",
"serde_json",
"thiserror",
"walkdir",
]
[[package]]
name = "hashbrown"
version = "0.12.3"
@ -1494,9 +1534,9 @@ dependencies = [
[[package]]
name = "http"
version = "0.2.11"
version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb"
checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482"
dependencies = [
"bytes 1.5.0",
"fnv",
@ -1522,7 +1562,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1"
dependencies = [
"bytes 1.5.0",
"http 0.2.11",
"http 0.2.9",
"pin-project-lite",
]
@ -1584,15 +1624,15 @@ dependencies = [
"futures-channel",
"futures-core",
"futures-util",
"h2 0.3.22",
"http 0.2.11",
"h2 0.3.21",
"http 0.2.9",
"http-body 0.4.5",
"httparse",
"httpdate",
"itoa 1.0.9",
"pin-project-lite",
"socket2 0.4.10",
"tokio 1.34.0",
"tokio 1.33.0",
"tower-service",
"tracing",
"want 0.3.1",
@ -1605,10 +1645,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590"
dependencies = [
"futures-util",
"http 0.2.11",
"http 0.2.9",
"hyper 0.14.27",
"rustls",
"tokio 1.34.0",
"tokio 1.33.0",
"tokio-rustls",
]
@ -1667,16 +1707,6 @@ dependencies = [
"hashbrown 0.12.3",
]
[[package]]
name = "indexmap"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f"
dependencies = [
"equivalent",
"hashbrown 0.14.2",
]
[[package]]
name = "iovec"
version = "0.1.4"
@ -1788,7 +1818,7 @@ dependencies = [
"parcel_selectors",
"paste",
"pathdiff",
"smallvec 1.11.2",
"smallvec 1.11.1",
]
[[package]]
@ -1910,42 +1940,12 @@ version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5"
[[package]]
name = "maud"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0bab19cef8a7fe1c18a43e881793bfc9d4ea984befec3ae5bd0415abf3ecf00"
dependencies = [
"actix-web",
"futures-util",
"itoa 1.0.9",
"maud_macros",
]
[[package]]
name = "maud_macros"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0be95d66c3024ffce639216058e5bae17a83ecaf266ffc6e4d060ad447c9eed2"
dependencies = [
"proc-macro-error",
"proc-macro2 1.0.69",
"quote 1.0.33",
"syn 1.0.109",
]
[[package]]
name = "maybe-uninit"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
[[package]]
name = "md5"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771"
[[package]]
name = "memchr"
version = "2.6.4"
@ -1996,7 +1996,7 @@ dependencies = [
"crossbeam-utils 0.8.16",
"dashmap",
"skeptic",
"smallvec 1.11.2",
"smallvec 1.11.1",
"tagptr",
"triomphe",
]
@ -2249,7 +2249,7 @@ dependencies = [
"phf 0.10.1",
"phf_codegen 0.10.0",
"precomputed-hash",
"smallvec 1.11.2",
"smallvec 1.11.1",
]
[[package]]
@ -2297,7 +2297,7 @@ dependencies = [
"cfg-if 1.0.0",
"libc",
"redox_syscall 0.4.1",
"smallvec 1.11.2",
"smallvec 1.11.1",
"windows-targets",
]
@ -2338,6 +2338,51 @@ version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
[[package]]
name = "pest"
version = "2.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5"
dependencies = [
"memchr",
"thiserror",
"ucd-trie",
]
[[package]]
name = "pest_derive"
version = "2.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81d78524685f5ef2a3b3bd1cafbc9fcabb036253d9b1463e726a91cd16e2dfc2"
dependencies = [
"pest",
"pest_generator",
]
[[package]]
name = "pest_generator"
version = "2.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68bd1206e71118b5356dae5ddc61c8b11e28b09ef6a31acbd15ea48a28e0c227"
dependencies = [
"pest",
"pest_meta",
"proc-macro2 1.0.69",
"quote 1.0.33",
"syn 2.0.39",
]
[[package]]
name = "pest_meta"
version = "2.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6"
dependencies = [
"once_cell",
"pest",
"sha2",
]
[[package]]
name = "phf"
version = "0.7.24"
@ -2512,30 +2557,6 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
[[package]]
name = "proc-macro-error"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
dependencies = [
"proc-macro-error-attr",
"proc-macro2 1.0.69",
"quote 1.0.33",
"syn 1.0.109",
"version_check",
]
[[package]]
name = "proc-macro-error-attr"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
dependencies = [
"proc-macro2 1.0.69",
"quote 1.0.33",
"version_check",
]
[[package]]
name = "proc-macro2"
version = "0.4.30"
@ -2779,7 +2800,7 @@ dependencies = [
"percent-encoding 2.3.0",
"pin-project-lite",
"ryu",
"tokio 1.34.0",
"tokio 1.33.0",
"tokio-retry",
"tokio-util",
"url 2.4.1",
@ -2875,8 +2896,8 @@ dependencies = [
"encoding_rs",
"futures-core",
"futures-util",
"h2 0.3.22",
"http 0.2.11",
"h2 0.3.21",
"http 0.2.9",
"http-body 0.4.5",
"hyper 0.14.27",
"hyper-rustls",
@ -2893,7 +2914,7 @@ dependencies = [
"serde_json",
"serde_urlencoded 0.7.1",
"system-configuration",
"tokio 1.34.0",
"tokio 1.33.0",
"tokio-rustls",
"tokio-util",
"tower-service",
@ -2964,9 +2985,9 @@ dependencies = [
[[package]]
name = "rustls"
version = "0.21.9"
version = "0.21.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9"
checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c"
dependencies = [
"log",
"ring",
@ -2976,9 +2997,9 @@ dependencies = [
[[package]]
name = "rustls-pemfile"
version = "1.0.4"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c"
checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2"
dependencies = [
"base64 0.21.5",
]
@ -3109,7 +3130,7 @@ dependencies = [
"phf_codegen 0.10.0",
"precomputed-hash",
"servo_arc",
"smallvec 1.11.2",
"smallvec 1.11.1",
]
[[package]]
@ -3211,6 +3232,17 @@ dependencies = [
"digest",
]
[[package]]
name = "sha2"
version = "0.10.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
dependencies = [
"cfg-if 1.0.0",
"cpufeatures",
"digest",
]
[[package]]
name = "signal-hook-registry"
version = "1.4.1"
@ -3267,9 +3299,9 @@ dependencies = [
[[package]]
name = "smallvec"
version = "1.11.2"
version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970"
checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a"
dependencies = [
"serde",
]
@ -3481,6 +3513,26 @@ dependencies = [
"utf-8",
]
[[package]]
name = "thiserror"
version = "1.0.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8"
dependencies = [
"proc-macro2 1.0.69",
"quote 1.0.33",
"syn 2.0.39",
]
[[package]]
name = "thousands"
version = "0.2.0"
@ -3573,9 +3625,9 @@ dependencies = [
[[package]]
name = "tokio"
version = "1.34.0"
version = "1.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9"
checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653"
dependencies = [
"backtrace",
"bytes 1.5.0",
@ -3634,9 +3686,9 @@ dependencies = [
[[package]]
name = "tokio-macros"
version = "2.2.0"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
dependencies = [
"proc-macro2 1.0.69",
"quote 1.0.33",
@ -3670,7 +3722,7 @@ checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f"
dependencies = [
"pin-project",
"rand 0.8.5",
"tokio 1.34.0",
"tokio 1.33.0",
]
[[package]]
@ -3680,7 +3732,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081"
dependencies = [
"rustls",
"tokio 1.34.0",
"tokio 1.33.0",
]
[[package]]
@ -3746,7 +3798,7 @@ dependencies = [
"futures-core",
"futures-sink",
"pin-project-lite",
"tokio 1.34.0",
"tokio 1.33.0",
"tracing",
]
@ -3812,6 +3864,12 @@ version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
[[package]]
name = "ucd-trie"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9"
[[package]]
name = "unicase"
version = "2.7.0"
@ -4041,7 +4099,7 @@ checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc"
[[package]]
name = "websurfx"
version = "1.2.27"
version = "1.2.28"
dependencies = [
"actix-cors",
"actix-files",
@ -4049,16 +4107,16 @@ dependencies = [
"actix-web",
"async-once-cell",
"async-trait",
"blake3",
"criterion",
"dhat",
"env_logger",
"error-stack",
"fake-useragent",
"futures 0.3.29",
"handlebars",
"lightningcss",
"log",
"maud",
"md5",
"mimalloc",
"mini-moka",
"minify-js",
@ -4070,9 +4128,9 @@ dependencies = [
"scraper",
"serde",
"serde_json",
"smallvec 1.11.2",
"smallvec 1.11.1",
"tempfile",
"tokio 1.34.0",
"tokio 1.33.0",
]
[[package]]
@ -4227,18 +4285,18 @@ dependencies = [
[[package]]
name = "zerocopy"
version = "0.7.26"
version = "0.7.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0"
checksum = "8cd369a67c0edfef15010f980c3cbe45d7f651deac2cd67ce097cd801de16557"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
version = "0.7.26"
version = "0.7.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f"
checksum = "c2f140bda219a26ccc0cdb03dba58af72590c53b22642577d88a927bc5c87d6b"
dependencies = [
"proc-macro2 1.0.69",
"quote 1.0.33",

View File

@ -1,6 +1,6 @@
[package]
name = "websurfx"
version = "1.2.27"
version = "1.2.28"
edition = "2021"
description = "An open-source alternative to Searx that provides clean, ad-free, and organic results with incredible speed while keeping privacy and security in mind."
repository = "https://github.com/neon-mmd/websurfx"
@ -27,7 +27,7 @@ env_logger = {version="0.10.0", default-features=false}
log = {version="0.4.20", default-features=false}
mlua = {version="0.9.1", features=["luajit", "vendored"], default-features=false}
redis = {version="0.23.3", features=["tokio-comp","connection-manager"], default-features = false, optional = true}
md5 = {version="0.7.0", default-features=false}
blake3 = {version="1.5.0", default-features=false}
error-stack = {version="0.4.0", default-features=false, features=["std"]}
async-trait = {version="0.1.73", default-features=false}
regex = {version="1.9.4", features=["perf"], default-features = false}

View File

@ -1,9 +1,9 @@
//! This module provides the functionality to cache the aggregated results fetched and aggregated
//! from the upstream search engines in a json format.
use blake3::hash;
use error_stack::Report;
use futures::future::try_join_all;
use md5::compute;
use redis::{aio::ConnectionManager, AsyncCommands, Client, RedisError};
use super::error::CacheError;
@ -59,7 +59,7 @@ impl RedisCache {
///
/// * `url` - It takes an url as string.
fn hash_url(&self, url: &str) -> String {
format!("{:?}", compute(url))
format!("{:?}", blake3::hash(url.as_bytes()))
}
/// A function which fetches the cached json results as json string from the redis server.