diff --git a/.cargo/audit.toml b/.cargo/audit.toml index 10ee95c3fc..307d9a6ae3 100644 --- a/.cargo/audit.toml +++ b/.cargo/audit.toml @@ -1,12 +1,3 @@ [advisories] ignore = [ - "RUSTSEC-2020-0041", # https://github.com/bodil/sized-chunks/issues/11 - "RUSTSEC-2021-0078", - "RUSTSEC-2021-0079", - "RUSTSEC-2020-0159", - "RUSTSEC-2020-0071", - "RUSTSEC-2021-0124", - "RUSTSEC-2023-0034", # Bound by actix-http 2.2, Reqwest 0.10 - "RUSTSEC-2023-0044", # Bound to native-tls 0.2.11, request 0.10.10, hyper-tls 0.4.3 - "RUSTSEC-2023-0052", # Bound by reqwest, various tls libs ] diff --git a/Cargo.lock b/Cargo.lock index ea3c7e6f8b..a355f4533f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,234 +4,152 @@ version = 3 [[package]] name = "actix-codec" -version = "0.3.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78d1833b3838dbe990df0f1f87baf640cf6146e898166afe401839d1b001e570" +checksum = "617a8268e3537fe1d8c9ead925fca49ef6400927ee7bc26750e90ecee14ce4b8" dependencies = [ "bitflags 1.3.2", - "bytes 0.5.6", + "bytes", "futures-core", "futures-sink", - "log", - "pin-project 0.4.30", - "tokio 0.2.25", - "tokio-util 0.3.1", -] - -[[package]] -name = "actix-connect" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177837a10863f15ba8d3ae3ec12fac1099099529ed20083a27fdfe247381d0dc" -dependencies = [ - "actix-codec", - "actix-rt", - "actix-service", - "actix-utils", - "derive_more", - "either", - "futures-util", - "http", - "log", - "trust-dns-proto", - "trust-dns-resolver", + "memchr", + "pin-project-lite", + "tokio", + "tokio-util", + "tracing", ] [[package]] name = "actix-cors" -version = "0.5.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36b133d8026a9f209a9aeeeacd028e7451bcca975f592881b305d37983f303d7" +checksum = "0346d8c1f762b41b458ed3145eea914966bb9ad20b9be0d6d463b20d45586370" dependencies = [ + "actix-utils", "actix-web", "derive_more", "futures-util", "log", "once_cell", - "tinyvec", + "smallvec", ] [[package]] name = "actix-http" -version = "2.2.2" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2be6b66b62a794a8e6d366ac9415bb7d475ffd1e9f4671f38c1d8a8a5df950b3" +checksum = "129d4c88e98860e1758c5de288d1632b07970a16d59bdf7b8d66053d582bb71f" dependencies = [ "actix-codec", - "actix-connect", "actix-rt", "actix-service", - "actix-threadpool", "actix-utils", - "base64 0.13.1", - "bitflags 1.3.2", + "ahash", + "base64 0.21.7", + "bitflags 2.4.2", "brotli", - "bytes 0.5.6", - "cookie", - "copyless", + "bytes", + "bytestring", "derive_more", - "either", "encoding_rs", "flate2", - "futures-channel", "futures-core", - "futures-util", - "fxhash", - "h2 0.2.7", + "h2", "http", "httparse", - "indexmap 1.9.3", - "itoa 0.4.8", + "httpdate", + "itoa", "language-tags", - "lazy_static", - "log", + "local-channel", "mime", "percent-encoding 2.3.1", - "pin-project 1.1.3", - "rand 0.7.3", - "regex", - "serde 1.0.194", - "serde_json", - "serde_urlencoded", - "sha-1", - "slab", - "time 0.2.27", + "pin-project-lite", + "rand", + "sha1", + "smallvec", + "tokio", + "tokio-util", + "tracing", + "zstd", ] [[package]] name = "actix-macros" -version = "0.1.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ca8ce00b267af8ccebbd647de0d61e0674b6e61185cc7a592ff88772bed655" +checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] name = "actix-router" -version = "0.2.7" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ad299af73649e1fc893e333ccf86f377751eb95ff875d095131574c6f43452c" +checksum = "d22475596539443685426b6bdadb926ad0ecaefdfc5fb05e5e3441f15463c511" dependencies = [ "bytestring", "http", - "log", "regex", - "serde 1.0.194", + "serde 1.0.195", + "tracing", ] [[package]] name = "actix-rt" -version = "1.1.1" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143fcc2912e0d1de2bcf4e2f720d2a60c28652ab4179685a1ee159e0fb3db227" +checksum = "28f32d40287d3f402ae0028a9d54bef51af15c8769492826a69d28f81893151d" dependencies = [ "actix-macros", - "actix-threadpool", - "copyless", - "futures-channel", - "futures-util", - "smallvec", - "tokio 0.2.25", + "futures-core", + "tokio", ] [[package]] name = "actix-server" -version = "1.0.4" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45407e6e672ca24784baa667c5d32ef109ccdd8d5e0b5ebb9ef8a67f4dfb708e" +checksum = "3eb13e7eef0423ea6eab0e59f6c72e7cb46d33691ad56a726b3cd07ddec2c2d4" dependencies = [ - "actix-codec", "actix-rt", "actix-service", "actix-utils", - "futures-channel", + "futures-core", "futures-util", - "log", - "mio 0.6.23", - "mio-uds", - "num_cpus", - "slab", - "socket2 0.3.19", + "mio", + "socket2 0.5.5", + "tokio", + "tracing", ] [[package]] name = "actix-service" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0052435d581b5be835d11f4eb3bce417c8af18d87ddf8ace99f8e67e595882bb" -dependencies = [ - "futures-util", - "pin-project 0.4.30", -] - -[[package]] -name = "actix-testing" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47239ca38799ab74ee6a8a94d1ce857014b2ac36f242f70f3f75a66f691e791c" -dependencies = [ - "actix-macros", - "actix-rt", - "actix-server", - "actix-service", - "log", - "socket2 0.3.19", -] - -[[package]] -name = "actix-threadpool" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d209f04d002854b9afd3743032a27b066158817965bf5d036824d19ac2cc0e30" -dependencies = [ - "derive_more", - "futures-channel", - "lazy_static", - "log", - "num_cpus", - "parking_lot 0.11.2", - "threadpool", -] - -[[package]] -name = "actix-tls" -version = "2.0.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24789b7d7361cf5503a504ebe1c10806896f61e96eca9a7350e23001aca715fb" +checksum = "3b894941f818cfdc7ccc4b9e60fa7e53b5042a2e8567270f9147d5591893373a" dependencies = [ - "actix-codec", - "actix-service", - "actix-utils", - "futures-util", + "futures-core", + "paste", + "pin-project-lite", ] [[package]] name = "actix-utils" -version = "2.0.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9022dec56632d1d7979e59af14f0597a28a830a9c1c7fec8b2327eb9f16b5a" +checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" dependencies = [ - "actix-codec", - "actix-rt", - "actix-service", - "bitflags 1.3.2", - "bytes 0.5.6", - "either", - "futures-channel", - "futures-sink", - "futures-util", - "log", - "pin-project 0.4.30", - "slab", + "local-waker", + "pin-project-lite", ] [[package]] name = "actix-web" -version = "3.3.3" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6534a126df581caf443ba2751cab42092c89b3f1d06a9d829b1e17edfe3e277" +checksum = "e43428f3bf11dee6d166b00ec2df4e3aa8cc1606aaa0b7433c146852e2f4e03b" dependencies = [ "actix-codec", "actix-http", @@ -240,41 +158,43 @@ dependencies = [ "actix-rt", "actix-server", "actix-service", - "actix-testing", - "actix-threadpool", - "actix-tls", "actix-utils", "actix-web-codegen", - "awc", - "bytes 0.5.6", + "ahash", + "bytes", + "bytestring", + "cfg-if", + "cookie", "derive_more", "encoding_rs", - "futures-channel", "futures-core", "futures-util", - "fxhash", + "itoa", + "language-tags", "log", "mime", - "pin-project 1.1.3", + "once_cell", + "pin-project-lite", "regex", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "serde_urlencoded", - "socket2 0.3.19", - "time 0.2.27", - "tinyvec", + "smallvec", + "socket2 0.5.5", + "time", "url 2.5.0", ] [[package]] name = "actix-web-codegen" -version = "0.4.0" +version = "4.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad26f77093333e0e7c6ffe54ebe3582d908a104e448723eec6d43d08b07143fb" +checksum = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5" dependencies = [ + "actix-router", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] @@ -292,6 +212,19 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "ahash" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "1.1.2" @@ -337,7 +270,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -364,7 +297,7 @@ version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", "serde_json", ] @@ -376,7 +309,7 @@ checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.48", ] [[package]] @@ -387,7 +320,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi 0.1.19", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -396,30 +329,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "awc" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b381e490e7b0cfc37ebc54079b0413d8093ef43d14a4e4747083f7fa47a9e691" -dependencies = [ - "actix-codec", - "actix-http", - "actix-rt", - "actix-service", - "base64 0.13.1", - "bytes 0.5.6", - "cfg-if 1.0.0", - "derive_more", - "futures-core", - "log", - "mime", - "percent-encoding 2.3.1", - "rand 0.7.3", - "serde 1.0.194", - "serde_json", - "serde_urlencoded", -] - [[package]] name = "backtrace" version = "0.3.69" @@ -428,25 +337,13 @@ checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", ] -[[package]] -name = "base-x" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" - -[[package]] -name = "base64" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" - [[package]] name = "base64" version = "0.13.1" @@ -455,9 +352,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "bindgen" @@ -490,18 +387,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" - -[[package]] -name = "block-buffer" -version = "0.9.0" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "block-buffer" @@ -554,12 +442,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - [[package]] name = "bytes" version = "1.5.0" @@ -572,7 +454,7 @@ version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74d80203ea6b29df88012294f62733de21cfeab47f17b41af3a38bc30a03ee72" dependencies = [ - "bytes 1.5.0", + "bytes", ] [[package]] @@ -590,6 +472,7 @@ version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ + "jobserver", "libc", ] @@ -602,12 +485,6 @@ dependencies = [ "nom 7.1.3", ] -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -681,7 +558,7 @@ checksum = "19b076e143e1d9538dde65da30f8481c2a6c44040edb8e02b9bf1351edb92ce3" dependencies = [ "lazy_static", "nom 5.1.3", - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -693,19 +570,13 @@ dependencies = [ "lazy_static", "nom 5.1.3", "rust-ini", - "serde 1.0.194", + "serde 1.0.195", "serde-hjson", "serde_json", "toml", "yaml-rust", ] -[[package]] -name = "const_fn" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" - [[package]] name = "convert_case" version = "0.4.0" @@ -714,21 +585,15 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "cookie" -version = "0.14.4" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a5d7b21829bc7b4bf4754a978a241ae54ea55a40f92bb20216e54096f4b951" +checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ "percent-encoding 2.3.1", - "time 0.2.27", + "time", "version_check", ] -[[package]] -name = "copyless" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2df960f5d869b2dd8532793fde43eb5427cceb126c929747a26823ab0eeb536" - [[package]] name = "core-foundation" version = "0.9.4" @@ -747,9 +612,9 @@ checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -760,49 +625,32 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82a9b73a36529d9c47029b9fb3a6f0ea3cc916a261195352ba19e770fc1748b2" +checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.18", + "crossbeam-utils", ] [[package]] name = "crossbeam-queue" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" -dependencies = [ - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-utils" -version = "0.7.2" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "lazy_static", + "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.18" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a430a770ebd84726f584a90ee7f020d28db52c6d02138900f22341f866d39c" -dependencies = [ - "cfg-if 1.0.0", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crypto-common" @@ -826,7 +674,7 @@ dependencies = [ "openssl-sys", "schannel", "socket2 0.4.10", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -846,15 +694,15 @@ dependencies = [ [[package]] name = "deadpool" -version = "0.5.2" -source = "git+https://github.com/mozilla-services/deadpool?branch=deadpool-v0.5.2-issue92#ede2a1f1fa22a7266cf4681edd2b988dfd333af9" +version = "0.7.0" +source = "git+https://github.com/mozilla-services/deadpool?tag=deadpool-v0.7.0#4e041037f758186e62021021e130926d5302ebe8" dependencies = [ "async-trait", "config 0.10.1", "crossbeam-queue", "num_cpus", - "serde 1.0.194", - "tokio 0.2.25", + "serde 1.0.195", + "tokio", ] [[package]] @@ -863,7 +711,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", "uuid", ] @@ -885,7 +733,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", + "rustc_version", "syn 1.0.109", ] @@ -939,22 +787,13 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - [[package]] name = "digest" version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", + "block-buffer", "crypto-common", "subtle", ] @@ -965,7 +804,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "dirs-sys-next", ] @@ -977,15 +816,9 @@ checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", "redox_users", - "winapi 0.3.9", + "winapi", ] -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - [[package]] name = "docopt" version = "1.1.1" @@ -994,7 +827,7 @@ checksum = "7f3f119846c823f9eafcf953a8f6ffb6ed69bf6240883261a7f13b634579a51f" dependencies = [ "lazy_static", "regex", - "serde 1.0.194", + "serde 1.0.195", "strsim 0.10.0", ] @@ -1016,19 +849,7 @@ version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "enum-as-inner" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "570d109b813e904becc80d8d5da38376818a143348413f7149f1340fe04754d4" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 1.0.109", + "cfg-if", ] [[package]] @@ -1046,9 +867,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -1069,7 +890,7 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -1097,7 +918,7 @@ dependencies = [ "cc", "lazy_static", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1140,22 +961,6 @@ dependencies = [ "percent-encoding 2.3.1", ] -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags 1.3.2", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - [[package]] name = "futures" version = "0.1.31" @@ -1218,7 +1023,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.48", ] [[package]] @@ -1247,20 +1052,11 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.13", + "pin-project-lite", "pin-utils", "slab", ] -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -1273,24 +1069,13 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -1327,7 +1112,7 @@ dependencies = [ "grpcio-sys", "libc", "log", - "parking_lot 0.12.1", + "parking_lot", "protobuf", ] @@ -1349,49 +1134,23 @@ dependencies = [ [[package]] name = "h2" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535" -dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap 1.9.3", - "slab", - "tokio 0.2.25", - "tokio-util 0.3.1", - "tracing", - "tracing-futures", -] - -[[package]] -name = "h2" -version = "0.3.22" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ - "bytes 1.5.0", + "bytes", "fnv", "futures-core", "futures-sink", "futures-util", "http", - "indexmap 2.1.0", + "indexmap", "slab", - "tokio 1.35.1", - "tokio-util 0.7.10", + "tokio", + "tokio-util", "tracing", ] -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hashbrown" version = "0.14.3" @@ -1408,7 +1167,7 @@ dependencies = [ "base64 0.13.1", "log", "once_cell", - "ring", + "ring 0.16.20", "thiserror", "url 2.5.0", ] @@ -1430,9 +1189,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" [[package]] name = "hex" @@ -1455,7 +1214,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.7", + "digest", ] [[package]] @@ -1475,7 +1234,7 @@ checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" dependencies = [ "libc", "match_cfg", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1484,19 +1243,9 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ - "bytes 1.5.0", + "bytes", "fnv", - "itoa 1.0.10", -] - -[[package]] -name = "http-body" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" -dependencies = [ - "bytes 0.5.6", - "http", + "itoa", ] [[package]] @@ -1505,9 +1254,9 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ - "bytes 1.5.0", + "bytes", "http", - "pin-project-lite 0.2.13", + "pin-project-lite", ] [[package]] @@ -1516,12 +1265,6 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" -[[package]] -name = "httpdate" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" - [[package]] name = "httpdate" version = "1.0.3" @@ -1534,49 +1277,25 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" -[[package]] -name = "hyper" -version = "0.13.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a6f157065790a3ed2f88679250419b5cdd96e714a0d65f7797fd337186e96bb" -dependencies = [ - "bytes 0.5.6", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.2.7", - "http", - "http-body 0.3.1", - "httparse", - "httpdate 0.3.2", - "itoa 0.4.8", - "pin-project 1.1.3", - "socket2 0.3.19", - "tokio 0.2.25", - "tower-service", - "tracing", - "want", -] - [[package]] name = "hyper" version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ - "bytes 1.5.0", + "bytes", "futures-channel", "futures-core", "futures-util", - "h2 0.3.22", + "h2", "http", - "http-body 0.4.6", + "http-body", "httparse", - "httpdate 1.0.3", - "itoa 1.0.10", - "pin-project-lite 0.2.13", + "httpdate", + "itoa", + "pin-project-lite", "socket2 0.5.5", - "tokio 1.35.1", + "tokio", "tower-service", "tracing", "want", @@ -1584,31 +1303,16 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.21.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ - "bytes 0.5.6", "futures-util", - "hyper 0.13.10", - "log", + "http", + "hyper", "rustls", - "tokio 0.2.25", + "tokio", "tokio-rustls", - "webpki", -] - -[[package]] -name = "hyper-tls" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed" -dependencies = [ - "bytes 0.5.6", - "hyper 0.13.10", - "native-tls", - "tokio 0.2.25", - "tokio-tls", ] [[package]] @@ -1617,10 +1321,10 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.5.0", - "hyper 0.14.28", + "bytes", + "hyper", "native-tls", - "tokio 1.35.1", + "tokio", "tokio-native-tls", ] @@ -1658,17 +1362,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "idna" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.4.0" @@ -1695,16 +1388,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - [[package]] name = "indexmap" version = "2.1.0" @@ -1712,7 +1395,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown", ] [[package]] @@ -1721,36 +1404,6 @@ version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] - -[[package]] -name = "ipconfig" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7" -dependencies = [ - "socket2 0.3.19", - "widestring", - "winapi 0.3.9", - "winreg 0.6.2", -] - [[package]] name = "ipnet" version = "2.9.0" @@ -1763,17 +1416,11 @@ version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi 0.3.4", "rustix", "windows-sys 0.52.0", ] -[[package]] -name = "itoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" - [[package]] name = "itoa" version = "1.0.10" @@ -1781,29 +1428,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] -name = "js-sys" -version = "0.3.66" +name = "jobserver" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ - "wasm-bindgen", + "libc", ] [[package]] -name = "kernel32-sys" -version = "0.2.2" +name = "js-sys" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" dependencies = [ - "winapi 0.2.8", - "winapi-build", + "wasm-bindgen", ] [[package]] name = "language-tags" -version = "0.2.2" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" +checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" [[package]] name = "lazy_static" @@ -1825,16 +1471,16 @@ checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" dependencies = [ "arrayvec", "bitflags 1.3.2", - "cfg-if 1.0.0", + "cfg-if", "ryu", "static_assertions", ] [[package]] name = "libc" -version = "0.2.151" +version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" [[package]] name = "libloading" @@ -1842,7 +1488,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "windows-sys 0.48.0", ] @@ -1852,16 +1498,16 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "libc", - "redox_syscall 0.4.1", + "redox_syscall", ] [[package]] name = "libz-sys" -version = "1.1.12" +version = "1.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" +checksum = "295c17e837573c8c821dbaeb3cceb3d745ad082f7572191409e69cbc1b3fd050" dependencies = [ "cc", "libc", @@ -1877,9 +1523,26 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + +[[package]] +name = "local-channel" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6cbc85e69b8df4b8bb8b89ec634e7189099cea8927a276b7384ce5488e53ec8" +dependencies = [ + "futures-core", + "futures-sink", + "local-waker", +] + +[[package]] +name = "local-waker" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" [[package]] name = "lock_api" @@ -1897,15 +1560,6 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -[[package]] -name = "lru-cache" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" -dependencies = [ - "linked-hash-map", -] - [[package]] name = "match_cfg" version = "0.1.0" @@ -1918,12 +1572,6 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - [[package]] name = "memchr" version = "2.7.1" @@ -1966,16 +1614,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "mime_guess" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" -dependencies = [ - "mime", - "unicase", -] - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -1991,25 +1629,6 @@ dependencies = [ "adler", ] -[[package]] -name = "mio" -version = "0.6.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" -dependencies = [ - "cfg-if 0.1.10", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", - "libc", - "log", - "miow", - "net2", - "slab", - "winapi 0.2.8", -] - [[package]] name = "mio" version = "0.8.10" @@ -2017,33 +1636,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "log", + "wasi", "windows-sys 0.48.0", ] -[[package]] -name = "mio-uds" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" -dependencies = [ - "iovec", - "libc", - "mio 0.6.23", -] - -[[package]] -name = "miow" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", -] - [[package]] name = "mockito" version = "0.30.0" @@ -2056,7 +1653,7 @@ dependencies = [ "httparse", "lazy_static", "log", - "rand 0.8.5", + "rand", "regex", "serde_json", "serde_urlencoded", @@ -2090,17 +1687,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "net2" -version = "0.2.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b13b648036a2339d06de780866fbdfda0dde886de7b3af2ddeba8b14f4ee34ac" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi 0.3.9", -] - [[package]] name = "nom" version = "5.1.3" @@ -2146,7 +1732,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi 0.3.4", "libc", ] @@ -2174,20 +1760,14 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - [[package]] name = "openssl" version = "0.10.62" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cde4d2d9200ad5909f8dac647e29482e07c3a35de8a13fce7c9c7747ad9f671" dependencies = [ - "bitflags 2.4.1", - "cfg-if 1.0.0", + "bitflags 2.4.2", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -2203,7 +1783,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.48", ] [[package]] @@ -2231,19 +1811,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e" dependencies = [ "log", - "serde 1.0.194", - "winapi 0.3.9", -] - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", + "serde 1.0.195", + "winapi", ] [[package]] @@ -2253,21 +1822,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.9", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if 1.0.0", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi 0.3.9", + "parking_lot_core", ] [[package]] @@ -2276,13 +1831,19 @@ version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "redox_syscall 0.4.1", + "redox_syscall", "smallvec", "windows-targets 0.48.5", ] +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + [[package]] name = "peeking_take_while" version = "0.1.2" @@ -2301,52 +1862,6 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" -[[package]] -name = "pin-project" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef0f924a5ee7ea9cbcea77529dba45f8a9ba9f622419fe3386ca581a3ae9d5a" -dependencies = [ - "pin-project-internal 0.4.30", -] - -[[package]] -name = "pin-project" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" -dependencies = [ - "pin-project-internal 1.1.3", -] - -[[package]] -name = "pin-project-internal" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "851c8d0ce9bebe43790dedfc86614c23494ac9f423dd618d3a61fc693eafe61e" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[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.47", -] - -[[package]] -name = "pin-project-lite" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" - [[package]] name = "pin-project-lite" version = "0.2.13" @@ -2361,9 +1876,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" [[package]] name = "powerfmt" @@ -2401,17 +1916,11 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" dependencies = [ "unicode-ident", ] @@ -2424,15 +1933,15 @@ checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" [[package]] name = "pyo3" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e82ad98ce1991c9c70c3464ba4187337b9c45fcbbb060d46dca15f0c075e14e2" +checksum = "9a89dc7a5850d0e983be1ec2a463a171d20990487c3cfcd68b5363f1ee3d6fe0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "indoc", "libc", "memoffset", - "parking_lot 0.12.1", + "parking_lot", "pyo3-build-config", "pyo3-ffi", "pyo3-macros", @@ -2441,9 +1950,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5503d0b3aee2c7a8dbb389cd87cd9649f675d4c7f60ca33699a3e3859d81a891" +checksum = "07426f0d8fe5a601f26293f300afd1a7b1ed5e78b2a705870c5f30893c5163be" dependencies = [ "once_cell", "target-lexicon", @@ -2451,9 +1960,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a79e8d80486a00d11c0dcb27cd2aa17c022cc95c677b461f01797226ba8f41" +checksum = "dbb7dec17e17766b46bca4f1a4215a85006b4c2ecde122076c562dd058da6cf1" dependencies = [ "libc", "pyo3-build-config", @@ -2461,34 +1970,28 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4b0dc7eaa578604fab11c8c7ff8934c71249c61d4def8e272c76ed879f03d4" +checksum = "05f738b4e40d50b5711957f142878cfa0f28e054aa0ebdfc3fd137a843f74ed3" dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn 2.0.47", + "syn 2.0.48", ] [[package]] name = "pyo3-macros-backend" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816a4f709e29ddab2e3cdfe94600d554c5556cad0ddfeea95c47b580c3247fa4" +checksum = "0fc910d4851847827daf9d6cdd4a823fbdaab5b8818325c5e97a86da79e8881f" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.48", ] -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - [[package]] name = "quote" version = "1.0.35" @@ -2505,23 +2008,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93" dependencies = [ "log", - "parking_lot 0.12.1", + "parking_lot", "scheduled-thread-pool", ] -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -2529,18 +2019,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", + "rand_chacha", + "rand_core", ] [[package]] @@ -2550,16 +2030,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", + "rand_core", ] [[package]] @@ -2568,25 +2039,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.11", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", + "getrandom", ] [[package]] @@ -2604,7 +2057,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.11", + "getrandom", "libredox", "thiserror", ] @@ -2638,62 +2091,23 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" -[[package]] -name = "reqwest" -version = "0.10.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0718f81a8e14c4dbb3b34cf23dc6aaf9ab8a0dfec160c534b3dbca1aaa21f47c" -dependencies = [ - "base64 0.13.1", - "bytes 0.5.6", - "encoding_rs", - "futures-core", - "futures-util", - "http", - "http-body 0.3.1", - "hyper 0.13.10", - "hyper-rustls", - "hyper-tls 0.4.3", - "ipnet", - "js-sys", - "lazy_static", - "log", - "mime", - "mime_guess", - "native-tls", - "percent-encoding 2.3.1", - "pin-project-lite 0.2.13", - "rustls", - "serde 1.0.194", - "serde_json", - "serde_urlencoded", - "tokio 0.2.25", - "tokio-rustls", - "tokio-tls", - "url 2.5.0", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots", - "winreg 0.7.0", -] - [[package]] name = "reqwest" version = "0.11.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" dependencies = [ - "base64 0.21.5", - "bytes 1.5.0", + "base64 0.21.7", + "bytes", "encoding_rs", "futures-core", "futures-util", - "h2 0.3.22", + "h2", "http", - "http-body 0.4.6", - "hyper 0.14.28", - "hyper-tls 0.5.0", + "http-body", + "hyper", + "hyper-rustls", + "hyper-tls", "ipnet", "js-sys", "log", @@ -2701,44 +2115,52 @@ dependencies = [ "native-tls", "once_cell", "percent-encoding 2.3.1", - "pin-project-lite 0.2.13", - "serde 1.0.194", + "pin-project-lite", + "rustls", + "rustls-pemfile", + "serde 1.0.195", "serde_json", "serde_urlencoded", "system-configuration", - "tokio 1.35.1", + "tokio", "tokio-native-tls", + "tokio-rustls", "tower-service", "url 2.5.0", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winreg 0.50.0", + "webpki-roots", + "winreg", ] [[package]] -name = "resolv-conf" -version = "0.7.0" +name = "ring" +version = "0.16.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" dependencies = [ - "hostname", - "quick-error", + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi", ] [[package]] name = "ring" -version = "0.16.20" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", + "getrandom", "libc", - "once_cell", - "spin", - "untrusted", - "web-sys", - "winapi 0.3.9", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", ] [[package]] @@ -2756,17 +2178,8 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc-hash" version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" @@ -2774,16 +2187,16 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.21", + "semver", ] [[package]] name = "rustix" -version = "0.38.28" +version = "0.38.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "errno", "libc", "linux-raw-sys", @@ -2792,15 +2205,33 @@ dependencies = [ [[package]] name = "rustls" -version = "0.18.1" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ - "base64 0.12.3", "log", - "ring", + "ring 0.17.7", + "rustls-webpki", "sct", - "webpki", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] @@ -2839,7 +2270,7 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19" dependencies = [ - "parking_lot 0.12.1", + "parking_lot", ] [[package]] @@ -2850,12 +2281,12 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" -version = "0.6.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring", - "untrusted", + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] @@ -2881,27 +2312,12 @@ dependencies = [ "libc", ] -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - [[package]] name = "semver" version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - [[package]] name = "sentry" version = "0.31.8" @@ -2909,16 +2325,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce4b57f1b521f674df7a1d200be8ff5d74e3712020ee25b553146657b5377d5" dependencies = [ "curl", - "httpdate 1.0.3", + "httpdate", "native-tls", - "reqwest 0.11.23", + "reqwest", "sentry-backtrace", "sentry-contexts", "sentry-core", "sentry-debug-images", "sentry-panic", "sentry-tracing", - "tokio 1.35.1", + "tokio", "ureq", ] @@ -2943,7 +2359,7 @@ dependencies = [ "hostname", "libc", "os_info", - "rustc_version 0.4.0", + "rustc_version", "sentry-core", "uname", ] @@ -2955,9 +2371,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "901f761681f97db3db836ef9e094acdd8756c40215326c194201941947164ef1" dependencies = [ "once_cell", - "rand 0.8.5", + "rand", "sentry-types", - "serde 1.0.194", + "serde 1.0.195", "serde_json", ] @@ -3002,11 +2418,11 @@ checksum = "da956cca56e0101998c8688bc65ce1a96f00673a0e58e663664023d4c7911e82" dependencies = [ "debugid", "hex", - "rand 0.8.5", - "serde 1.0.194", + "rand", + "serde 1.0.195", "serde_json", "thiserror", - "time 0.3.31", + "time", "url 2.5.0", "uuid", ] @@ -3019,9 +2435,9 @@ checksum = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" [[package]] name = "serde" -version = "1.0.194" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b114498256798c94a0689e1a15fec6005dee8ac1f41de56404b67afc2a4b773" +checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" dependencies = [ "serde_derive", ] @@ -3040,24 +2456,24 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.194" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3385e45322e8f9931410f01b3031ec534c3947d0e94c18049af4d9f9907d4e0" +checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.110" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fbd975230bada99c8bb618e0c365c2eefa219158d5c6c29610fd09ff1833257" +checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ - "itoa 1.0.10", + "itoa", "ryu", - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -3067,48 +2483,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.10", + "itoa", "ryu", - "serde 1.0.194", -] - -[[package]] -name = "sha-1" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "serde 1.0.195", ] [[package]] name = "sha1" -version = "0.6.1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "sha1_smol", + "cfg-if", + "cpufeatures", + "digest", ] -[[package]] -name = "sha1_smol" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" - [[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", + "cfg-if", "cpufeatures", - "digest 0.10.7", + "digest", ] [[package]] @@ -3178,7 +2577,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f400f1c5db96f1f52065e8931ca0c524cceb029f7537c9e6d5424488ca137ca0" dependencies = [ "chrono", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "slog", ] @@ -3215,25 +2614,14 @@ dependencies = [ "slog", "term", "thread_local", - "time 0.3.31", + "time", ] [[package]] name = "smallvec" -version = "1.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" - -[[package]] -name = "socket2" -version = "0.3.19" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "winapi 0.3.9", -] +checksum = "3b187f0231d56fe41bfb12034819dd2bf336422a5866de41bc3fec4b2e3883e8" [[package]] name = "socket2" @@ -3242,7 +2630,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3262,13 +2650,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] -name = "standback" -version = "0.2.17" +name = "spin" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" -dependencies = [ - "version_check", -] +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "static_assertions" @@ -3276,55 +2661,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "stdweb" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" -dependencies = [ - "discard", - "rustc_version 0.2.3", - "stdweb-derive", - "stdweb-internal-macros", - "stdweb-internal-runtime", - "wasm-bindgen", -] - -[[package]] -name = "stdweb-derive" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" -dependencies = [ - "proc-macro2", - "quote", - "serde 1.0.194", - "serde_derive", - "syn 1.0.109", -] - -[[package]] -name = "stdweb-internal-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" -dependencies = [ - "base-x", - "proc-macro2", - "quote", - "serde 1.0.194", - "serde_derive", - "serde_json", - "sha1", - "syn 1.0.109", -] - -[[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" - [[package]] name = "strsim" version = "0.8.0" @@ -3356,9 +2692,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.47" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1726efe18f42ae774cc644f330953a5e7b3c3003d3edcecf18850fe9d4dd9afb" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -3375,12 +2711,12 @@ dependencies = [ "actix-web", "async-trait", "backtrace", - "base64 0.21.5", + "base64 0.21.7", "cadence", "chrono", "docopt", "dyn-clone", - "env_logger 0.10.1", + "env_logger 0.10.2", "futures 0.3.30", "hawk", "hex", @@ -3388,12 +2724,12 @@ dependencies = [ "hostname", "lazy_static", "mime", - "rand 0.8.5", + "rand", "regex", - "reqwest 0.10.10", + "reqwest", "sentry", "sentry-backtrace", - "serde 1.0.194", + "serde 1.0.195", "serde_derive", "serde_json", "sha2", @@ -3410,12 +2746,12 @@ dependencies = [ "syncstorage-db", "syncstorage-settings", "thiserror", - "time 0.3.31", + "time", "tokenserver-auth", "tokenserver-common", "tokenserver-db", "tokenserver-settings", - "tokio 0.2.25", + "tokio", "urlencoding", "validator", "validator_derive", @@ -3430,7 +2766,7 @@ dependencies = [ "cadence", "futures 0.3.30", "hkdf", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "sha2", "slog", @@ -3457,7 +2793,7 @@ version = "0.14.4" dependencies = [ "config 0.11.0", "num_cpus", - "serde 1.0.194", + "serde 1.0.195", "slog-scope", "syncserver-common", "syncstorage-settings", @@ -3471,12 +2807,12 @@ version = "0.14.4" dependencies = [ "async-trait", "cadence", - "env_logger 0.10.1", + "env_logger 0.10.2", "futures 0.3.30", "hostname", "lazy_static", "log", - "rand 0.8.5", + "rand", "slog-scope", "syncserver-common", "syncserver-db-common", @@ -3485,7 +2821,7 @@ dependencies = [ "syncstorage-mysql", "syncstorage-settings", "syncstorage-spanner", - "tokio 0.2.25", + "tokio", ] [[package]] @@ -3500,7 +2836,7 @@ dependencies = [ "futures 0.3.30", "http", "lazy_static", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "syncserver-common", "syncserver-db-common", @@ -3513,11 +2849,11 @@ version = "0.14.4" dependencies = [ "async-trait", "backtrace", - "base64 0.21.5", + "base64 0.21.7", "diesel", "diesel_logger", "diesel_migrations", - "env_logger 0.10.1", + "env_logger 0.10.2", "futures 0.3.30", "http", "slog-scope", @@ -3534,10 +2870,10 @@ dependencies = [ name = "syncstorage-settings" version = "0.14.4" dependencies = [ - "rand 0.8.5", - "serde 1.0.194", + "rand", + "serde 1.0.195", "syncserver-common", - "time 0.3.31", + "time", ] [[package]] @@ -3548,7 +2884,7 @@ dependencies = [ "backtrace", "cadence", "deadpool", - "env_logger 0.10.1", + "env_logger 0.10.2", "form_urlencoded", "futures 0.3.30", "google-cloud-rust-raw", @@ -3562,7 +2898,7 @@ dependencies = [ "syncstorage-db-common", "syncstorage-settings", "thiserror", - "tokio 0.2.25", + "tokio", "url 2.5.0", "uuid", ] @@ -3606,9 +2942,9 @@ version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", - "redox_syscall 0.4.1", + "redox_syscall", "rustix", "windows-sys 0.52.0", ] @@ -3621,14 +2957,14 @@ checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" dependencies = [ "dirs-next", "rustversion", - "winapi 0.3.9", + "winapi", ] [[package]] name = "termcolor" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] @@ -3659,7 +2995,7 @@ checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.48", ] [[package]] @@ -3668,34 +3004,10 @@ version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", ] -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", -] - -[[package]] -name = "time" -version = "0.2.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" -dependencies = [ - "const_fn", - "libc", - "standback", - "stdweb", - "time-macros 0.1.1", - "version_check", - "winapi 0.3.9", -] - [[package]] name = "time" version = "0.3.31" @@ -3703,13 +3015,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" dependencies = [ "deranged", - "itoa 1.0.10", + "itoa", "libc", "num_threads", "powerfmt", - "serde 1.0.194", + "serde 1.0.195", "time-core", - "time-macros 0.2.16", + "time-macros", ] [[package]] @@ -3718,16 +3030,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" -[[package]] -name = "time-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" -dependencies = [ - "proc-macro-hack", - "time-macros-impl", -] - [[package]] name = "time-macros" version = "0.2.16" @@ -3737,19 +3039,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "time-macros-impl" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "standback", - "syn 1.0.109", -] - [[package]] name = "tinyvec" version = "1.6.0" @@ -3774,13 +3063,13 @@ dependencies = [ "futures 0.3.30", "mockito", "pyo3", - "reqwest 0.10.10", - "serde 1.0.194", + "reqwest", + "serde 1.0.195", "serde_json", "syncserver-common", "tokenserver-common", "tokenserver-settings", - "tokio 0.2.25", + "tokio", ] [[package]] @@ -3789,7 +3078,7 @@ version = "0.14.4" dependencies = [ "actix-web", "backtrace", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "syncserver-common", "thiserror", @@ -3804,10 +3093,10 @@ dependencies = [ "diesel", "diesel_logger", "diesel_migrations", - "env_logger 0.10.1", + "env_logger 0.10.2", "futures 0.3.30", "http", - "serde 1.0.194", + "serde 1.0.195", "serde_derive", "serde_json", "slog-scope", @@ -3817,39 +3106,17 @@ dependencies = [ "thiserror", "tokenserver-common", "tokenserver-settings", - "tokio 0.2.25", + "tokio", ] [[package]] name = "tokenserver-settings" version = "0.14.4" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", "tokenserver-common", ] -[[package]] -name = "tokio" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092" -dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "iovec", - "lazy_static", - "libc", - "memchr", - "mio 0.6.23", - "mio-uds", - "pin-project-lite 0.1.12", - "signal-hook-registry", - "slab", - "tokio-macros", - "winapi 0.3.9", -] - [[package]] name = "tokio" version = "1.35.1" @@ -3857,24 +3124,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ "backtrace", - "bytes 1.5.0", + "bytes", "libc", - "mio 0.8.10", + "mio", "num_cpus", - "pin-project-lite 0.2.13", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", "socket2 0.5.5", + "tokio-macros", "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "0.2.6" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e44da00bfc73a25f814cd8d7e57a68a5c31b74b3152a0a1d1f590c97ed06265a" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] @@ -3884,43 +3154,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" dependencies = [ "native-tls", - "tokio 1.35.1", + "tokio", ] [[package]] name = "tokio-rustls" -version = "0.14.1" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "futures-core", "rustls", - "tokio 0.2.25", - "webpki", -] - -[[package]] -name = "tokio-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" -dependencies = [ - "native-tls", - "tokio 0.2.25", -] - -[[package]] -name = "tokio-util" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" -dependencies = [ - "bytes 0.5.6", - "futures-core", - "futures-sink", - "log", - "pin-project-lite 0.1.12", - "tokio 0.2.25", + "tokio", ] [[package]] @@ -3929,11 +3173,11 @@ version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ - "bytes 1.5.0", + "bytes", "futures-core", "futures-sink", - "pin-project-lite 0.2.13", - "tokio 1.35.1", + "pin-project-lite", + "tokio", "tracing", ] @@ -3943,7 +3187,7 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -3959,7 +3203,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "log", - "pin-project-lite 0.2.13", + "pin-project-lite", "tracing-core", ] @@ -3973,16 +3217,6 @@ dependencies = [ "valuable", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project 1.1.3", - "tracing", -] - [[package]] name = "tracing-subscriber" version = "0.3.18" @@ -3992,45 +3226,6 @@ dependencies = [ "tracing-core", ] -[[package]] -name = "trust-dns-proto" -version = "0.19.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cad71a0c0d68ab9941d2fb6e82f8fb2e86d9945b94e1661dd0aaea2b88215a9" -dependencies = [ - "async-trait", - "cfg-if 1.0.0", - "enum-as-inner", - "futures 0.3.30", - "idna 0.2.3", - "lazy_static", - "log", - "rand 0.7.3", - "smallvec", - "thiserror", - "tokio 0.2.25", - "url 2.5.0", -] - -[[package]] -name = "trust-dns-resolver" -version = "0.19.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "710f593b371175db53a26d0b38ed2978fafb9e9e8d3868b1acd753ea18df0ceb" -dependencies = [ - "cfg-if 0.1.10", - "futures 0.3.30", - "ipconfig", - "lazy_static", - "log", - "lru-cache", - "resolv-conf", - "smallvec", - "thiserror", - "tokio 0.2.25", - "trust-dns-proto", -] - [[package]] name = "try-lock" version = "0.2.5" @@ -4052,20 +3247,11 @@ dependencies = [ "libc", ] -[[package]] -name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - [[package]] name = "unicode-bidi" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -4100,13 +3286,19 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "ureq" version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8cdd25c339e200129fe4de81451814e5228c9b771d57378817d6117cc2b3f97" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "log", "native-tls", "once_cell", @@ -4133,7 +3325,7 @@ dependencies = [ "form_urlencoded", "idna 0.5.0", "percent-encoding 2.3.1", - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -4144,12 +3336,12 @@ checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "uuid" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" dependencies = [ - "getrandom 0.2.11", - "serde 1.0.194", + "getrandom", + "serde 1.0.195", ] [[package]] @@ -4161,7 +3353,7 @@ dependencies = [ "idna 0.4.0", "lazy_static", "regex", - "serde 1.0.194", + "serde 1.0.195", "serde_derive", "serde_json", "url 2.5.0", @@ -4236,12 +3428,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -4250,38 +3436,36 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" dependencies = [ - "cfg-if 1.0.0", - "serde 1.0.194", - "serde_json", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.48", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.39" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" +checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -4289,9 +3473,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4299,51 +3483,38 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" +checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" [[package]] name = "web-sys" -version = "0.3.66" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" dependencies = [ "js-sys", "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "webpki-roots" -version = "0.20.0" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f20dea7535251981a9670857150d571846545088359b28e4951d350bdaf179f" -dependencies = [ - "webpki", -] +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" [[package]] name = "which" @@ -4357,18 +3528,6 @@ dependencies = [ "rustix", ] -[[package]] -name = "widestring" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - [[package]] name = "winapi" version = "0.3.9" @@ -4379,12 +3538,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -4397,7 +3550,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -4549,57 +3702,77 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winreg" -version = "0.6.2" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi 0.3.9", + "cfg-if", + "windows-sys 0.48.0", ] [[package]] -name = "winreg" -version = "0.7.0" +name = "woothee" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "896174c6a4779d4d7d4523dd27aef7d46609eda2497e370f6c998325c6bf6971" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "yaml-rust" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" dependencies = [ - "winapi 0.3.9", + "linked-hash-map", ] [[package]] -name = "winreg" -version = "0.50.0" +name = "zerocopy" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ - "cfg-if 1.0.0", - "windows-sys 0.48.0", + "zerocopy-derive", ] [[package]] -name = "woothee" +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "zstd" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "896174c6a4779d4d7d4523dd27aef7d46609eda2497e370f6c998325c6bf6971" +checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" dependencies = [ - "lazy_static", - "regex", + "zstd-safe", ] [[package]] -name = "ws2_32-sys" -version = "0.2.1" +name = "zstd-safe" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e" dependencies = [ - "winapi 0.2.8", - "winapi-build", + "zstd-sys", ] [[package]] -name = "yaml-rust" -version = "0.4.5" +name = "zstd-sys" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" dependencies = [ - "linked-hash-map", + "cc", + "pkg-config", ] diff --git a/Cargo.toml b/Cargo.toml index 3c43aa25e6..fd875a0709 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ edition = "2021" license = "MPL-2.0" [workspace.dependencies] -actix-web = "3" +actix-web = "4" base64 = "0.21" cadence = "0.29" @@ -43,7 +43,7 @@ lazy_static = "1.4" protobuf = "=2.25.2" # pin to 2.25.2 to prevent side updating rand = "0.8" regex = "1.4" -reqwest = "^0.10" # 0.11+ requires tokio v1.34 +reqwest = "0.11" sentry = { version = "0.31", features = ["curl"] } sentry-backtrace = "0.31" serde = "1.0" @@ -61,7 +61,7 @@ slog-mozlog-json = "0.1" slog-scope = "4.3" slog-stdlog = "4.1" slog-term = "2.6" -tokio = "^0.2.4" +tokio = "1" [profile.release] # Enables line numbers in Sentry reporting diff --git a/syncserver-common/src/lib.rs b/syncserver-common/src/lib.rs index 1bbc9e9b6f..b0762bd396 100644 --- a/syncserver-common/src/lib.rs +++ b/syncserver-common/src/lib.rs @@ -8,7 +8,7 @@ use std::{ sync::atomic::{AtomicU64, Ordering}, }; -use actix_web::{error::BlockingError, web}; +use actix_web::web; use hkdf::Hkdf; use sha2::Sha256; @@ -93,11 +93,10 @@ impl BlockingThreadpool { { self.spawned_tasks.fetch_add(1, Ordering::Relaxed); - let result = web::block(f).await.map_err(|e| match e { - BlockingError::Error(e) => e, - BlockingError::Canceled => { - E::internal_error("Blocking threadpool operation canceled".to_owned()) - } + let result = web::block(f).await.unwrap_or_else(|_| { + Err(E::internal_error( + "Blocking threadpool operation canceled".to_owned(), + )) }); self.spawned_tasks.fetch_sub(1, Ordering::Relaxed); diff --git a/syncserver-db-common/Cargo.toml b/syncserver-db-common/Cargo.toml index 6b04ca4103..c9a1783994 100644 --- a/syncserver-db-common/Cargo.toml +++ b/syncserver-db-common/Cargo.toml @@ -10,10 +10,7 @@ backtrace.workspace=true futures.workspace=true http.workspace=true -# Pin to 0.5 for now, to keep it under tokio 0.2 (issue977). -# Fix for #803 (deadpool#92) points to our fork for now -#deadpool = "0.5" # pin to 0.5 -deadpool = { git = "https://github.com/mozilla-services/deadpool", branch = "deadpool-v0.5.2-issue92" } +deadpool = { git = "https://github.com/mozilla-services/deadpool", tag = "deadpool-v0.7.0" } diesel = { version = "1.4", features = ["mysql", "r2d2"] } diesel_migrations = { version = "1.4.0", features = ["mysql"] } syncserver-common = { path = "../syncserver-common" } diff --git a/syncserver-settings/src/lib.rs b/syncserver-settings/src/lib.rs index c4d5b3a186..fc9d208e6b 100644 --- a/syncserver-settings/src/lib.rs +++ b/syncserver-settings/src/lib.rs @@ -20,6 +20,7 @@ static PREFIX: &str = "sync"; pub struct Settings { pub port: u16, pub host: String, + /// Keep-alive header value (seconds) pub actix_keep_alive: Option, /// The master secret, from which are derived /// the signing secret and token secret diff --git a/syncserver/Cargo.toml b/syncserver/Cargo.toml index 5540d1c764..8b715057dc 100644 --- a/syncserver/Cargo.toml +++ b/syncserver/Cargo.toml @@ -33,9 +33,9 @@ slog-scope.workspace = true slog-stdlog.workspace = true slog-term.workspace = true -actix-http = "2" -actix-rt = "1" # Pin to 1.0, due to dependencies on Tokio -actix-cors = "0.5" # pin to 0.5. 0.6 introduces breaking change +actix-http = "3" +actix-rt = "2" +actix-cors = "0.6" async-trait = "0.1.40" dyn-clone = "1.0.4" hostname = "0.3.1" @@ -58,7 +58,6 @@ tokenserver-auth = { path = "../tokenserver-auth" } tokenserver-common = { path = "../tokenserver-common" } tokenserver-db = { path = "../tokenserver-db" } tokenserver-settings = { path = "../tokenserver-settings" } -# pinning to 0.2.4 due to high number of dependencies (actix, bb8, deadpool, etc.) tokio = { workspace = true, features = ["macros", "sync"] } urlencoding = "2.1" validator = "0.16" diff --git a/syncserver/src/error.rs b/syncserver/src/error.rs index 933b4de0a0..fc0c53b11f 100644 --- a/syncserver/src/error.rs +++ b/syncserver/src/error.rs @@ -9,11 +9,8 @@ use std::convert::From; use std::fmt; use actix_web::{ - dev::{HttpResponseBuilder, ServiceResponse}, - error::ResponseError, - http::StatusCode, - middleware::errhandlers::ErrorHandlerResponse, - HttpResponse, Result, + dev::ServiceResponse, error::ResponseError, http::StatusCode, middleware::ErrorHandlerResponse, + HttpResponse, HttpResponseBuilder, Result, }; use serde::{ @@ -117,14 +114,14 @@ impl ApiError { pub fn render_404(res: ServiceResponse) -> Result> { if res.request().path().starts_with("/1.0/") { // Do not use a custom response for Tokenserver requests. - Ok(ErrorHandlerResponse::Response(res)) + Ok(ErrorHandlerResponse::Response(res.map_into_left_body())) } else { // Replace the outbound error message with our own for Sync requests. let resp = HttpResponseBuilder::new(StatusCode::NOT_FOUND) .json(WeaveError::UnknownError as u32); Ok(ErrorHandlerResponse::Response(ServiceResponse::new( res.request().clone(), - resp.into_body(), + resp.map_into_right_body(), ))) } } @@ -199,7 +196,7 @@ impl ResponseError for ApiError { // So instead we translate our error to a backwards compatible one let mut resp = HttpResponse::build(self.status); if self.is_conflict() { - resp.header("Retry-After", RETRY_AFTER.to_string()); + resp.insert_header(("Retry-After", RETRY_AFTER.to_string())); }; resp.json(self.weave_error_code() as i32) } diff --git a/syncserver/src/server/mod.rs b/syncserver/src/server/mod.rs index 0e7572a245..2c05999ccf 100644 --- a/syncserver/src/server/mod.rs +++ b/syncserver/src/server/mod.rs @@ -1,13 +1,13 @@ //! Main application server -use std::{env, sync::Arc, time::Duration}; +use std::{convert::Infallible, env, sync::Arc, time::Duration}; use actix_cors::Cors; use actix_web::{ dev::{self, Payload}, http::StatusCode, http::{header::LOCATION, Method}, - middleware::errhandlers::ErrorHandlers, + middleware::ErrorHandlers, web::{self, Data}, App, FromRequest, HttpRequest, HttpResponse, HttpServer, }; @@ -75,14 +75,14 @@ macro_rules! build_app { ($syncstorage_state: expr, $tokenserver_state: expr, $secrets: expr, $limits: expr, $cors: expr) => { App::new() .configure(|cfg| { - cfg.data($syncstorage_state); + cfg.app_data(Data::new($syncstorage_state)); if let Some(tokenserver_state) = $tokenserver_state { let state = tokenserver_state.clone(); - cfg.data(state); + cfg.app_data(Data::new(state)); } }) - .data($secrets) + .app_data(Data::new($secrets)) // Middleware is applied LIFO // These will wrap all outbound responses with matching status codes. .wrap(ErrorHandlers::new().handler(StatusCode::NOT_FOUND, ApiError::render_404)) @@ -165,7 +165,7 @@ macro_rules! build_app { */ ))) .service( - web::resource("/__version__").route(web::get().to(|_: HttpRequest| { + web::resource("/__version__").route(web::get().to(|_: HttpRequest| async { // return the contents of the version.json file created by circleci // and stored in the docker root HttpResponse::Ok() @@ -174,11 +174,13 @@ macro_rules! build_app { })), ) .service(web::resource("/__error__").route(web::get().to(handlers::test_error))) - .service(web::resource("/").route(web::get().to(|_: HttpRequest| { - HttpResponse::Found() - .header(LOCATION, SYNC_DOCS_URL) - .finish() - }))) + .service( + web::resource("/").route(web::get().to(|_: HttpRequest| async { + HttpResponse::Found() + .insert_header((LOCATION, SYNC_DOCS_URL)) + .finish() + })), + ) }; } @@ -186,8 +188,8 @@ macro_rules! build_app { macro_rules! build_app_without_syncstorage { ($state: expr, $secrets: expr, $cors: expr) => { App::new() - .data($state) - .data($secrets) + .app_data(Data::new($state)) + .app_data(Data::new($secrets)) // Middleware is applied LIFO // These will wrap all outbound responses with matching status codes. .wrap(ErrorHandlers::new().handler(StatusCode::NOT_FOUND, ApiError::render_404)) @@ -212,16 +214,16 @@ macro_rules! build_app_without_syncstorage { web::resource("/__heartbeat__") .route(web::get().to(tokenserver::handlers::heartbeat)), ) - .service( - web::resource("/__lbheartbeat__").route(web::get().to(|_: HttpRequest| { + .service(web::resource("/__lbheartbeat__").route(web::get().to( + |_: HttpRequest| async { // used by the load balancers, just return OK. HttpResponse::Ok() .content_type("application/json") .body("{}") - })), - ) + }, + ))) .service( - web::resource("/__version__").route(web::get().to(|_: HttpRequest| { + web::resource("/__version__").route(web::get().to(|_: HttpRequest| async { // return the contents of the version.json file created by circleci // and stored in the docker root HttpResponse::Ok() @@ -232,11 +234,13 @@ macro_rules! build_app_without_syncstorage { .service( web::resource("/__error__").route(web::get().to(tokenserver::handlers::test_error)), ) - .service(web::resource("/").route(web::get().to(|_: HttpRequest| { - HttpResponse::Found() - .header(LOCATION, SYNC_DOCS_URL) - .finish() - }))) + .service( + web::resource("/").route(web::get().to(|_: HttpRequest| async { + HttpResponse::Found() + .insert_header((LOCATION, SYNC_DOCS_URL)) + .finish() + })), + ) }; } @@ -310,7 +314,7 @@ impl Server { }); if let Some(keep_alive) = actix_keep_alive { - server = server.keep_alive(keep_alive as usize); + server = server.keep_alive(Duration::from_secs(keep_alive as u64)); } let server = server @@ -401,8 +405,7 @@ fn build_cors(settings: &Settings) -> Cors { pub struct MetricsWrapper(pub Metrics); impl FromRequest for MetricsWrapper { - type Config = (); - type Error = (); + type Error = Infallible; type Future = Ready>; fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future { @@ -471,7 +474,7 @@ fn spawn_metric_periodic_reporter( .with_tag("hostname", &hostname) .send(); - time::delay_for(interval).await; + time::sleep(interval).await; } }); diff --git a/syncserver/src/server/test.rs b/syncserver/src/server/test.rs index 8d85b6449b..ec09879196 100644 --- a/syncserver/src/server/test.rs +++ b/syncserver/src/server/test.rs @@ -3,7 +3,11 @@ use std::str::FromStr; use actix_web::{ dev::Service, - http::{self, HeaderName, HeaderValue, StatusCode}, + http::{ + self, + header::{HeaderName, HeaderValue}, + StatusCode, + }, test, web::Bytes, }; @@ -131,15 +135,15 @@ fn create_request( let settings = get_test_settings(); let mut req = test::TestRequest::with_uri(path) .method(method.clone()) - .header( + .insert_header(( "Authorization", create_hawk_header(method.as_str(), settings.port, path), - ) - .header("Accept", "application/json") - .header( + )) + .insert_header(("Accept", "application/json")) + .insert_header(( "User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0", - ); + )); if let Some(body) = payload { req = req.set_json(&body); }; @@ -149,7 +153,7 @@ fn create_request( let hn = HeaderName::from_lowercase(ln.as_bytes()) .expect("Could not get hn in create_request"); let hv = HeaderValue::from_str(v.as_str()).expect("Could not get hv in create_request"); - req = req.header(hn, hv); + req = req.insert_header((hn, hv)); } } req @@ -204,7 +208,7 @@ async fn test_endpoint( status: Option, expected_body: Option<&str>, ) { - let mut app = init_app!().await; + let app = init_app!().await; let req = create_request(method, path, None, None).to_request(); let sresp = app @@ -228,7 +232,7 @@ where let settings = get_test_settings(); let limits = Arc::new(settings.syncstorage.limits.clone()); let state = get_test_state(&settings).await; - let mut app = test::init_service(build_app!( + let app = test::init_service(build_app!( state, None::, Arc::clone(&SECRETS), @@ -270,7 +274,7 @@ async fn test_endpoint_with_body( let settings = get_test_settings(); let limits = Arc::new(settings.syncstorage.limits.clone()); let state = get_test_state(&settings).await; - let mut app = test::init_service(build_app!( + let app = test::init_service(build_app!( state, None::, Arc::clone(&SECRETS), @@ -492,7 +496,7 @@ async fn bsos_can_have_a_collection_field() { #[actix_rt::test] async fn invalid_content_type() { let path = "/1.5/42/storage/bookmarks/wibble"; - let mut app = init_app!().await; + let app = init_app!().await; let mut headers = HashMap::new(); headers.insert("Content-Type", "application/javascript".to_owned()); @@ -542,7 +546,7 @@ async fn invalid_content_type() { #[actix_rt::test] async fn invalid_batch_post() { - let mut app = init_app!().await; + let app = init_app!().await; let mut headers = HashMap::new(); headers.insert("accept", "application/json".to_owned()); @@ -569,7 +573,7 @@ async fn invalid_batch_post() { #[actix_rt::test] async fn accept_new_or_dev_ios() { - let mut app = init_app!().await; + let app = init_app!().await; let mut headers = HashMap::new(); headers.insert( "User-Agent", @@ -586,7 +590,7 @@ async fn accept_new_or_dev_ios() { let response = app.call(req).await.unwrap(); assert!(response.status().is_success()); - let mut app = init_app!().await; + let app = init_app!().await; let mut headers = HashMap::new(); headers.insert( "User-Agent", @@ -603,7 +607,7 @@ async fn accept_new_or_dev_ios() { let response = app.call(req).await.unwrap(); assert!(response.status().is_success()); - let mut app = init_app!().await; + let app = init_app!().await; let mut headers = HashMap::new(); headers.insert( "User-Agent", @@ -623,7 +627,7 @@ async fn accept_new_or_dev_ios() { #[actix_rt::test] async fn reject_old_ios() { - let mut app = init_app!().await; + let app = init_app!().await; let mut headers = HashMap::new(); headers.insert( "User-Agent", @@ -657,7 +661,7 @@ async fn reject_old_ios() { #[actix_rt::test] async fn info_configuration_xlm() { - let mut app = init_app!().await; + let app = init_app!().await; let req = create_request(http::Method::GET, "/1.5/42/info/configuration", None, None).to_request(); let response = app.call(req).await.unwrap(); @@ -680,7 +684,7 @@ async fn overquota() { settings.syncstorage.limits.max_quota_limit = 5; // persist the db across requests settings.syncstorage.database_use_test_transactions = false; - let mut app = init_app!(settings).await; + let app = init_app!(settings).await; // Clear out any data that's already in the store. let req = create_request(http::Method::DELETE, "/1.5/42/storage", None, None).to_request(); @@ -702,7 +706,7 @@ async fn overquota() { assert_eq!(status, StatusCode::OK); // avoid the request calls running so quickly that they trigger a 503 - actix_rt::time::delay_for(Duration::from_millis(10)).await; + actix_rt::time::sleep(Duration::from_millis(10)).await; let req = create_request( http::Method::PUT, @@ -739,12 +743,10 @@ async fn overquota() { #[actix_rt::test] async fn lbheartbeat_max_pool_size_check() { - use actix_web::web::Buf; - let mut settings = get_test_settings(); settings.syncstorage.database_pool_max_size = 10; - let mut app = init_app!(settings).await; + let app = init_app!(settings).await; // Test all is well. let lb_req = create_request(http::Method::GET, "/__lbheartbeat__", None, None).to_request(); @@ -770,14 +772,14 @@ async fn lbheartbeat_max_pool_size_check() { assert!(status == StatusCode::INTERNAL_SERVER_ERROR); // check duration for exhausted connections - actix_rt::time::delay_for(Duration::from_secs(1)).await; + actix_rt::time::sleep(Duration::from_secs(1)).await; let req = create_request(http::Method::GET, "/__lbheartbeat__", Some(headers), None).to_request(); let sresp = app.call(req).await.unwrap(); let status = sresp.status(); let body = test::read_body(sresp).await; let resp: HashMap = - serde_json::de::from_str(std::str::from_utf8(body.bytes()).unwrap()).unwrap(); + serde_json::de::from_str(std::str::from_utf8(body.as_ref()).unwrap()).unwrap(); // dbg!(status, body, &resp); assert!(status == StatusCode::INTERNAL_SERVER_ERROR); assert!(resp.get("duration_ms").unwrap().as_u64().unwrap() > 1000); @@ -800,13 +802,13 @@ async fn lbheartbeat_ttl_check() { settings.syncstorage.lbheartbeat_ttl = Some(2); settings.syncstorage.lbheartbeat_ttl_jitter = 60; - let mut app = init_app!(settings).await; + let app = init_app!(settings).await; let lb_req = create_request(http::Method::GET, "/__lbheartbeat__", None, None).to_request(); let sresp = app.call(lb_req).await.unwrap(); assert!(sresp.status().is_success()); - actix_rt::time::delay_for(Duration::from_secs(3)).await; + actix_rt::time::sleep(Duration::from_secs(3)).await; let lb_req = create_request(http::Method::GET, "/__lbheartbeat__", None, None).to_request(); let sresp = app.call(lb_req).await.unwrap(); diff --git a/syncserver/src/tokenserver/extractors.rs b/syncserver/src/tokenserver/extractors.rs index bd4f037b29..e3fe816371 100644 --- a/syncserver/src/tokenserver/extractors.rs +++ b/syncserver/src/tokenserver/extractors.rs @@ -180,7 +180,6 @@ impl TokenserverRequest { } impl FromRequest for TokenserverRequest { - type Config = (); type Error = TokenserverError; type Future = LocalBoxFuture<'static, Result>; @@ -311,7 +310,6 @@ struct QueryParams { pub struct DbWrapper(pub Box); impl FromRequest for DbWrapper { - type Config = (); type Error = TokenserverError; type Future = LocalBoxFuture<'static, Result>; @@ -336,7 +334,6 @@ impl FromRequest for DbWrapper { struct DbPoolWrapper(Box); impl FromRequest for DbPoolWrapper { - type Config = (); type Error = TokenserverError; type Future = LocalBoxFuture<'static, Result>; @@ -359,7 +356,6 @@ pub enum Token { } impl FromRequest for Token { - type Config = (); type Error = TokenserverError; type Future = LocalBoxFuture<'static, Result>; @@ -429,7 +425,6 @@ pub struct AuthData { } impl FromRequest for AuthData { - type Config = (); type Error = TokenserverError; type Future = LocalBoxFuture<'static, Result>; @@ -519,7 +514,6 @@ impl FromRequest for AuthData { struct XClientStateHeader(Option); impl FromRequest for XClientStateHeader { - type Config = (); type Error = TokenserverError; type Future = LocalBoxFuture<'static, Result>; @@ -561,7 +555,6 @@ struct KeyId { } impl FromRequest for KeyId { - type Config = (); type Error = TokenserverError; type Future = LocalBoxFuture<'static, Result>; @@ -643,7 +636,6 @@ impl FromRequest for KeyId { } impl FromRequest for TokenserverMetrics { - type Config = (); type Error = TokenserverError; type Future = LocalBoxFuture<'static, Result>; @@ -748,9 +740,9 @@ mod tests { let req = TestRequest::default() .data(state) .data(Arc::clone(&SECRETS)) - .header("authorization", "Bearer fake_token") - .header("accept", "application/json,text/plain:q=0.5") - .header("x-keyid", "0000000001234-qqo") + .insert_header(("authorization", "Bearer fake_token")) + .insert_header(("accept", "application/json,text/plain:q=0.5")) + .insert_header(("x-keyid", "0000000001234-qqo")) .param("application", "sync") .param("version", "1.5") .uri("/1.0/sync/1.5?duration=100") @@ -802,9 +794,9 @@ mod tests { let request = TestRequest::default() .data(state) .data(Arc::clone(&SECRETS)) - .header("authorization", "Bearer fake_token") - .header("accept", "application/json,text/plain:q=0.5") - .header("x-keyid", "0000000001234-qqo") + .insert_header(("authorization", "Bearer fake_token")) + .insert_header(("accept", "application/json,text/plain:q=0.5")) + .insert_header(("x-keyid", "0000000001234-qqo")) .param("application", "sync") .param("version", "1.5") .method(Method::GET) @@ -842,9 +834,9 @@ mod tests { TestRequest::default() .data(make_state(oauth_verifier, MockVerifier::default())) .data(Arc::clone(&SECRETS)) - .header("authorization", "Bearer fake_token") - .header("accept", "application/json,text/plain:q=0.5") - .header("x-keyid", "0000000001234-qqo") + .insert_header(("authorization", "Bearer fake_token")) + .insert_header(("accept", "application/json,text/plain:q=0.5")) + .insert_header(("x-keyid", "0000000001234-qqo")) .method(Method::GET) } @@ -946,8 +938,8 @@ mod tests { TestRequest::default() .data(make_state(oauth_verifier, MockVerifier::default())) - .header("authorization", "Bearer fake_token") - .header("accept", "application/json,text/plain:q=0.5") + .insert_header(("authorization", "Bearer fake_token")) + .insert_header(("accept", "application/json,text/plain:q=0.5")) .param("application", "sync") .param("version", "1.5") .method(Method::GET) @@ -968,7 +960,7 @@ mod tests { // X-KeyID header with non-visible ASCII characters (\u{200B} is the zero-width space character) { let request = build_request() - .header("x-keyid", "\u{200B}") + .insert_header(("x-keyid", "\u{200B}")) .to_http_request(); let response: HttpResponse = KeyId::extract(&request).await.unwrap_err().into(); assert_eq!(response.status(), StatusCode::UNAUTHORIZED); @@ -982,7 +974,7 @@ mod tests { // Improperly-formatted X-KeyID header { let request = build_request() - .header("x-keyid", "00000000") + .insert_header(("x-keyid", "00000000")) .to_http_request(); let response: HttpResponse = KeyId::extract(&request).await.unwrap_err().into(); assert_eq!(response.status(), StatusCode::UNAUTHORIZED); @@ -995,7 +987,7 @@ mod tests { // X-KeyID header with improperly-base64-encoded client state bytes { let request = build_request() - .header("x-keyid", "0000000001234-notbase64") + .insert_header(("x-keyid", "0000000001234-notbase64")) .to_http_request(); let response: HttpResponse = KeyId::extract(&request).await.unwrap_err().into(); assert_eq!(response.status(), StatusCode::UNAUTHORIZED); @@ -1008,7 +1000,7 @@ mod tests { // X-KeyID header with non-UTF-8 bytes { let request = build_request() - .header("x-keyid", &[0xFFu8, 0xFFu8, 0xFFu8, 0xFFu8][..]) + .insert_header(("x-keyid", &[0xFFu8, 0xFFu8, 0xFFu8, 0xFFu8][..])) .to_http_request(); let response: HttpResponse = KeyId::extract(&request).await.unwrap_err().into(); assert_eq!(response.status(), StatusCode::UNAUTHORIZED); @@ -1022,7 +1014,7 @@ mod tests { // X-KeyID header with non-integral keys_changed_at { let request = build_request() - .header("x-keyid", "notanumber-qqo") + .insert_header(("x-keyid", "notanumber-qqo")) .to_http_request(); let response: HttpResponse = KeyId::extract(&request).await.unwrap_err().into(); assert_eq!(response.status(), StatusCode::UNAUTHORIZED); @@ -1035,8 +1027,8 @@ mod tests { // X-KeyID header with client state that does not match that in the X-Client-State header { let request = build_request() - .header("x-keyid", "0000000001234-qqo") - .header("x-client-state", "bbbb") + .insert_header(("x-keyid", "0000000001234-qqo")) + .insert_header(("x-client-state", "bbbb")) .to_http_request(); let response: HttpResponse = KeyId::extract(&request).await.unwrap_err().into(); assert_eq!(response.status(), StatusCode::UNAUTHORIZED); @@ -1053,8 +1045,8 @@ mod tests { // Valid X-KeyID header with matching X-Client-State header { let request = build_request() - .header("x-keyid", "0000000001234-qqo") - .header("x-client-state", "aaaa") + .insert_header(("x-keyid", "0000000001234-qqo")) + .insert_header(("x-client-state", "aaaa")) .to_http_request(); let key_id = KeyId::extract(&request).await.unwrap(); let expected_key_id = KeyId { @@ -1068,7 +1060,7 @@ mod tests { // Valid X-KeyID header with no X-Client-State header { let request = build_request() - .header("x-keyid", "0000000001234-qqo") + .insert_header(("x-keyid", "0000000001234-qqo")) .to_http_request(); let key_id = KeyId::extract(&request).await.unwrap(); let expected_key_id = KeyId { diff --git a/syncserver/src/tokenserver/handlers.rs b/syncserver/src/tokenserver/handlers.rs index 2c1610dbdf..2a46c9a473 100644 --- a/syncserver/src/tokenserver/handlers.rs +++ b/syncserver/src/tokenserver/handlers.rs @@ -63,12 +63,12 @@ pub async fn get_tokenserver_result( }; Ok(HttpResponse::build(StatusCode::OK) - .header("X-Timestamp", timestamp.to_string()) + .insert_header(("X-Timestamp", timestamp.to_string())) // This header helps to prevent cross-site scripting attacks by // blocking content type sniffing. It was set automatically by the // Pyramid cornice library used by the Python Tokenserver, so we set // it here for safety and consistency. - .header("X-Content-Type-Options", "nosniff") + .insert_header(("X-Content-Type-Options", "nosniff")) .json(result)) } diff --git a/syncserver/src/tokenserver/logging.rs b/syncserver/src/tokenserver/logging.rs index 577f0b5518..5ae0c54bb7 100644 --- a/syncserver/src/tokenserver/logging.rs +++ b/syncserver/src/tokenserver/logging.rs @@ -6,19 +6,15 @@ use futures::future::Future; use super::LogItems; -pub fn handle_request_log_line( +pub fn handle_request_log_line( request: ServiceRequest, - service: &mut impl Service< - Request = ServiceRequest, - Response = ServiceResponse, - Error = actix_web::Error, - >, -) -> impl Future> { + service: &impl Service, Error = actix_web::Error>, +) -> impl Future, actix_web::Error>> { let items = LogItems::from(request.head()); request.extensions_mut().insert(items); let fut = service.call(request); - Box::pin(async move { + async move { let sresp = fut.await?; if let Some(items) = sresp.request().extensions().get::() { @@ -26,5 +22,5 @@ pub fn handle_request_log_line( } Ok(sresp) - }) + } } diff --git a/syncserver/src/tokenserver/mod.rs b/syncserver/src/tokenserver/mod.rs index f204cec6fd..f7dd727d46 100644 --- a/syncserver/src/tokenserver/mod.rs +++ b/syncserver/src/tokenserver/mod.rs @@ -2,7 +2,7 @@ pub mod extractors; pub mod handlers; pub mod logging; -use actix_web::{dev::RequestHead, http::header::USER_AGENT, HttpRequest}; +use actix_web::{dev::RequestHead, http::header::USER_AGENT, HttpMessage, HttpRequest}; use cadence::StatsdClient; use serde::{ ser::{SerializeMap, Serializer}, diff --git a/syncserver/src/web/extractors.rs b/syncserver/src/web/extractors.rs index 168d21cf3e..b913979324 100644 --- a/syncserver/src/web/extractors.rs +++ b/syncserver/src/web/extractors.rs @@ -9,7 +9,7 @@ use std::{ use actix_web::{ dev::{ConnectionInfo, Extensions, Payload, RequestHead}, http::{ - header::{qitem, Accept, ContentType, Header, HeaderMap}, + header::{Accept, ContentType, Header, HeaderMap, QualityItem}, Uri, }, web::{Data, Json, Query}, @@ -134,7 +134,7 @@ impl From for PostCollectionBso { // This will pull the first accepted content type listed, or the highest rated non-accepted type. fn get_accepted(req: &HttpRequest, accepted: &[&str], default: &'static str) -> String { let mut candidates = Accept::parse(req).unwrap_or_else(|_| { - Accept(vec![qitem( + Accept(vec![QualityItem::max( mime::Mime::from_str(default).expect("Could not get accept in get_accepted"), )]) }); @@ -165,7 +165,6 @@ pub struct BsoBodies { } impl FromRequest for BsoBodies { - type Config = (); type Error = Error; type Future = LocalBoxFuture<'static, Result>; @@ -370,7 +369,6 @@ pub struct BsoBody { } impl FromRequest for BsoBody { - type Config = (); type Error = Error; type Future = LocalBoxFuture<'static, Result>; @@ -533,7 +531,6 @@ impl BsoParam { } impl FromRequest for BsoParam { - type Config = (); type Error = Error; type Future = Ready>; @@ -606,7 +603,6 @@ impl CollectionParam { } impl FromRequest for CollectionParam { - type Config = (); type Error = Error; type Future = LocalBoxFuture<'static, Result>; @@ -639,7 +635,6 @@ pub struct MetaRequest { } impl FromRequest for MetaRequest { - type Config = (); type Error = Error; type Future = LocalBoxFuture<'static, Result>; @@ -680,7 +675,6 @@ pub struct CollectionRequest { } impl FromRequest for CollectionRequest { - type Config = (); type Error = Error; type Future = LocalBoxFuture<'static, Result>; @@ -741,7 +735,6 @@ pub struct CollectionPostRequest { } impl FromRequest for CollectionPostRequest { - type Config = (); type Error = Error; type Future = LocalBoxFuture<'static, Result>; @@ -836,7 +829,6 @@ pub struct BsoRequest { } impl FromRequest for BsoRequest { - type Config = (); type Error = Error; type Future = LocalBoxFuture<'static, Result>; @@ -878,7 +870,6 @@ pub struct BsoPutRequest { } impl FromRequest for BsoPutRequest { - type Config = (); type Error = Error; type Future = LocalBoxFuture<'static, Result>; @@ -941,7 +932,6 @@ pub struct HeartbeatRequest { } impl FromRequest for HeartbeatRequest { - type Config = (); type Error = Error; type Future = LocalBoxFuture<'static, Result>; @@ -985,7 +975,6 @@ pub struct TestErrorRequest { } impl FromRequest for TestErrorRequest { - type Config = (); type Error = Error; type Future = LocalBoxFuture<'static, Result>; @@ -1136,7 +1125,6 @@ impl From for UserIdentifier { } impl FromRequest for HawkIdentifier { - type Config = (); type Error = Error; type Future = Ready>; @@ -1259,7 +1247,6 @@ pub struct BsoQueryParams { } impl FromRequest for BsoQueryParams { - type Config = (); type Error = Error; type Future = LocalBoxFuture<'static, Result>; @@ -1341,7 +1328,6 @@ pub struct BatchRequestOpt { } impl FromRequest for BatchRequestOpt { - type Config = (); type Error = Error; type Future = LocalBoxFuture<'static, Result>; @@ -1560,7 +1546,6 @@ impl PreConditionHeaderOpt { } impl FromRequest for PreConditionHeaderOpt { - type Config = (); type Error = Error; type Future = LocalBoxFuture<'static, Result>; @@ -1857,11 +1842,11 @@ mod tests { .data(state) .data(secrets) .method(Method::POST) - .header("authorization", header) - .header("content-type", "application/json; charset=UTF-8") - .header("accept", "application/json;q=0.9,/;q=0.2") + .insert_header(("authorization", header)) + .insert_header(("content-type", "application/json; charset=UTF-8")) + .insert_header(("accept", "application/json;q=0.9,/;q=0.2")) .set_payload(bod_str.to_owned()) - .param("uid", &USER_ID_STR) + .param("uid", USER_ID_STR.as_str()) .param("collection", "tabs") .to_http_request(); req.extensions_mut().insert(make_db()); @@ -1904,10 +1889,10 @@ mod tests { #[test] fn test_weighted_header() { // test non-priority, full weight selection - let req = TestRequest::with_header( + let req = TestRequest::default().insert_header(( ACCEPT, HeaderValue::from_static("application/json;q=0.9,text/plain"), - ); + )); let selected = get_accepted( &req.to_http_request(), &ACCEPTED_CONTENT_TYPES, @@ -1916,7 +1901,8 @@ mod tests { assert_eq!(selected, "text/plain".to_owned()); // test default for */* - let req = TestRequest::with_header(ACCEPT, HeaderValue::from_static("*/*;q=0.2,foo/bar")); + let req = TestRequest::default() + .insert_header((ACCEPT, HeaderValue::from_static("*/*;q=0.2,foo/bar"))); let selected = get_accepted( &req.to_http_request(), &ACCEPTED_CONTENT_TYPES, @@ -1925,10 +1911,10 @@ mod tests { assert_eq!(selected, "application/json".to_owned()); // test default for selected weighted. - let req = TestRequest::with_header( + let req = TestRequest::default().insert_header(( ACCEPT, HeaderValue::from_static("foo/bar;q=0.1,application/json;q=0.5,text/plain;q=0.9"), - ); + )); let selected = get_accepted( &req.to_http_request(), &ACCEPTED_CONTENT_TYPES, @@ -1960,9 +1946,9 @@ mod tests { let req = TestRequest::with_uri(&uri) .data(state) .data(secrets) - .header("authorization", header) + .insert_header(("authorization", header)) .method(Method::GET) - .param("uid", &USER_ID_STR) + .param("uid", USER_ID_STR.as_str()) .param("collection", "tabs") .param("bso", "asdf") .to_http_request(); @@ -1985,10 +1971,10 @@ mod tests { let req = TestRequest::with_uri(&uri) .data(state) .data(secrets) - .header("authorization", header) + .insert_header(("authorization", header)) .method(Method::GET) // `param` sets the value that would be extracted from the tokenized URI, as if the router did it. - .param("uid", &USER_ID_STR) + .param("uid", USER_ID_STR.as_str()) .param("collection", "tabs") .param("bso", INVALID_BSO_NAME) .to_http_request(); @@ -2025,11 +2011,11 @@ mod tests { let req = TestRequest::with_uri(&uri) .data(state) .data(secrets) - .header("authorization", header) - .header("content-type", "application/json") + .insert_header(("authorization", header)) + .insert_header(("content-type", "application/json")) .method(Method::POST) .set_payload(bso_body.to_string()) - .param("uid", &USER_ID_STR) + .param("uid", USER_ID_STR.as_str()) .param("collection", "tabs") .param("bso", "asdf") .to_http_request(); @@ -2058,11 +2044,11 @@ mod tests { let req = TestRequest::with_uri(&uri) .data(state) .data(secrets) - .header("authorization", header) - .header("content-type", "application/json") + .insert_header(("authorization", header)) + .insert_header(("content-type", "application/json")) .method(Method::POST) .set_payload(bso_body.to_string()) - .param("uid", &USER_ID_STR) + .param("uid", USER_ID_STR.as_str()) .param("collection", "tabs") .param("bso", "asdf") .to_http_request(); @@ -2096,10 +2082,10 @@ mod tests { let req = TestRequest::with_uri(&uri) .data(state) .data(secrets) - .header("authorization", header) - .header("accept", "application/json,text/plain:q=0.5") + .insert_header(("authorization", header)) + .insert_header(("accept", "application/json,text/plain:q=0.5")) .method(Method::GET) - .param("uid", &USER_ID_STR) + .param("uid", USER_ID_STR.as_str()) .param("collection", "tabs") .to_http_request(); req.extensions_mut().insert(make_db()); @@ -2125,8 +2111,8 @@ mod tests { let req = TestRequest::with_uri(&uri) .data(state) .data(secrets) - .header("authorization", header) - .header("accept", "application/json,text/plain:q=0.5") + .insert_header(("authorization", header)) + .insert_header(("accept", "application/json,text/plain:q=0.5")) .method(Method::GET) .to_http_request(); req.extensions_mut().insert(make_db()); @@ -2146,11 +2132,11 @@ mod tests { let header = create_valid_hawk_header(&hawk_payload, &secrets, "GET", &uri, TEST_HOST, TEST_PORT); let req = TestRequest::with_uri(&uri) - .header("authorization", header) + .insert_header(("authorization", header)) .method(Method::GET) .data(state) .data(secrets) - .param("uid", &USER_ID_STR) + .param("uid", USER_ID_STR.as_str()) .param("collection", INVALID_COLLECTION_NAME) .to_http_request(); req.extensions_mut().insert(make_db()); @@ -2284,8 +2270,8 @@ mod tests { } let req = TestRequest::with_uri("/") .data(make_state()) - .header("X-If-Modified-Since", "32124.32") - .header("X-If-Unmodified-Since", "4212.12") + .insert_header(("X-If-Modified-Since", "32124.32")) + .insert_header(("X-If-Unmodified-Since", "4212.12")) .to_http_request(); assert_invalid_header( req, @@ -2294,7 +2280,7 @@ mod tests { ); let req = TestRequest::with_uri("/") .data(make_state()) - .header("X-If-Modified-Since", "-32.1") + .insert_header(("X-If-Modified-Since", "-32.1")) .to_http_request(); assert_invalid_header(req, "X-If-Modified-Since", "Invalid value"); } @@ -2303,7 +2289,7 @@ mod tests { fn test_valid_precondition_headers() { let req = TestRequest::with_uri("/") .data(make_state()) - .header("X-If-Modified-Since", "32.1") + .insert_header(("X-If-Modified-Since", "32.1")) .to_http_request(); let result = PreConditionHeaderOpt::extrude(req.headers()) .unwrap() @@ -2315,7 +2301,7 @@ mod tests { ); let req = TestRequest::with_uri("/") .data(make_state()) - .header("X-If-Unmodified-Since", "32.14") + .insert_header(("X-If-Unmodified-Since", "32.14")) .to_http_request(); let result = PreConditionHeaderOpt::extrude(req.headers()) .unwrap() @@ -2336,11 +2322,11 @@ mod tests { let header = create_valid_hawk_header(&hawk_payload, &secrets, "GET", &uri, TEST_HOST, TEST_PORT); let req = TestRequest::with_uri(&uri) - .header("authorization", header) + .insert_header(("authorization", header)) .method(Method::GET) .data(state) .data(secrets) - .param("uid", &USER_ID_STR) + .param("uid", USER_ID_STR.as_str()) .to_http_request(); let mut payload = Payload::None; let result = block_on(HawkIdentifier::from_request(&req, &mut payload)) @@ -2361,7 +2347,7 @@ mod tests { let req = TestRequest::with_uri(&uri) .data(state) .data(secrets) - .header("authorization", header) + .insert_header(("authorization", header)) .method(Method::GET) .param("uid", mismatch_uid) .to_http_request(); diff --git a/syncserver/src/web/handlers.rs b/syncserver/src/web/handlers.rs index 7af9432e58..e8bf797b0e 100644 --- a/syncserver/src/web/handlers.rs +++ b/syncserver/src/web/handlers.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; use std::convert::Into; -use actix_web::{dev::HttpResponseBuilder, http::StatusCode, web::Data, HttpRequest, HttpResponse}; +use actix_web::{http::StatusCode, web::Data, HttpRequest, HttpResponse, HttpResponseBuilder}; use serde::Serialize; use serde_json::{json, Value}; use syncserver_common::{X_LAST_MODIFIED, X_WEAVE_NEXT_OFFSET, X_WEAVE_RECORDS}; @@ -38,7 +38,7 @@ pub async fn get_collections( let result = db.get_collection_timestamps(meta.user_id).await?; Ok(HttpResponse::build(StatusCode::OK) - .header(X_WEAVE_RECORDS, result.len().to_string()) + .insert_header((X_WEAVE_RECORDS, result.len().to_string())) .json(result)) }) .await @@ -55,7 +55,7 @@ pub async fn get_collection_counts( let result = db.get_collection_counts(meta.user_id).await?; Ok(HttpResponse::build(StatusCode::OK) - .header(X_WEAVE_RECORDS, result.len().to_string()) + .insert_header((X_WEAVE_RECORDS, result.len().to_string())) .json(result)) }) .await @@ -77,7 +77,7 @@ pub async fn get_collection_usage( .collect(); Ok(HttpResponse::build(StatusCode::OK) - .header(X_WEAVE_RECORDS, usage.len().to_string()) + .insert_header((X_WEAVE_RECORDS, usage.len().to_string())) .json(usage)) }) .await @@ -148,7 +148,7 @@ pub async fn delete_collection( let mut resp = HttpResponse::Ok(); if delete_bsos { - resp.header(X_LAST_MODIFIED, timestamp.as_header()); + resp.insert_header((X_LAST_MODIFIED, timestamp.as_header())); } Ok(resp.json(timestamp)) }) @@ -212,11 +212,11 @@ where let mut builder = HttpResponse::build(StatusCode::OK); let resp = builder - .header(X_LAST_MODIFIED, ts.as_header()) - .header(X_WEAVE_RECORDS, result.items.len().to_string()); + .insert_header((X_LAST_MODIFIED, ts.as_header())) + .insert_header((X_WEAVE_RECORDS, result.items.len().to_string())); if let Some(offset) = result.offset { - resp.header(X_WEAVE_NEXT_OFFSET, offset); + resp.insert_header((X_WEAVE_NEXT_OFFSET, offset)); } match coll.reply { @@ -231,8 +231,8 @@ where .collect(); Ok(resp - .header("Content-Type", "application/newlines") - .header("Content-Length", format!("{}", items.len())) + .insert_header(("Content-Type", "application/newlines")) + .insert_header(("Content-Length", format!("{}", items.len()))) .body(items)) } } @@ -271,7 +271,7 @@ pub async fn post_collection( .await?; Ok(HttpResponse::build(StatusCode::OK) - .header(X_LAST_MODIFIED, result.modified.as_header()) + .insert_header((X_LAST_MODIFIED, result.modified.as_header())) .json(result)) }) .await @@ -447,7 +447,7 @@ pub async fn post_collection_batch( resp["modified"] = json!(modified); trace!("Batch: Returning result: {}", &resp); Ok(HttpResponse::build(StatusCode::OK) - .header(X_LAST_MODIFIED, modified.as_header()) + .insert_header((X_LAST_MODIFIED, modified.as_header())) .json(resp)) } @@ -515,13 +515,13 @@ pub async fn put_bso( .await?; Ok(HttpResponse::build(StatusCode::OK) - .header(X_LAST_MODIFIED, result.as_header()) + .insert_header((X_LAST_MODIFIED, result.as_header())) .json(result)) }) .await } -pub fn get_configuration(state: Data) -> HttpResponse { +pub async fn get_configuration(state: Data) -> HttpResponse { // With no DbConnection (via a `transaction_http` call) needed here, we // miss out on a couple things it does: // 1. Ensuring an X-Last-Modified (always 0.00) is returned @@ -529,9 +529,9 @@ pub fn get_configuration(state: Data) -> HttpResponse { // The precondition checks don't make sense against hardcoded to the // service limits data + a 0.00 timestamp, so just ensure #1 is handled HttpResponse::Ok() - .header(X_LAST_MODIFIED, "0.00") + .insert_header((X_LAST_MODIFIED, "0.00")) .content_type("application/json") - .body(&state.limits_json) + .body(state.limits_json.clone()) } /** Returns a status message indicating the state of the current server diff --git a/syncserver/src/web/middleware/mod.rs b/syncserver/src/web/middleware/mod.rs index 82072cbd7c..d6cd7863a0 100644 --- a/syncserver/src/web/middleware/mod.rs +++ b/syncserver/src/web/middleware/mod.rs @@ -12,6 +12,7 @@ use std::future::Future; use actix_web::{ dev::{Service, ServiceRequest, ServiceResponse}, web::Data, + HttpMessage, }; use syncserver_common::Metrics; use tokenserver_auth::TokenserverOrigin; @@ -19,14 +20,10 @@ use tokenserver_auth::TokenserverOrigin; use crate::error::{ApiError, ApiErrorKind}; use crate::server::ServerState; -pub fn emit_http_status_with_tokenserver_origin( +pub fn emit_http_status_with_tokenserver_origin( req: ServiceRequest, - srv: &mut impl Service< - Request = ServiceRequest, - Response = ServiceResponse, - Error = actix_web::Error, - >, -) -> impl Future> { + srv: &impl Service, Error = actix_web::Error>, +) -> impl Future, actix_web::Error>> { let fut = srv.call(req); async move { diff --git a/syncserver/src/web/middleware/rejectua.rs b/syncserver/src/web/middleware/rejectua.rs index d27115d009..b71a56f950 100644 --- a/syncserver/src/web/middleware/rejectua.rs +++ b/syncserver/src/web/middleware/rejectua.rs @@ -1,6 +1,7 @@ #![allow(clippy::type_complexity)] use actix_web::{ + body::EitherBody, dev::{Service, ServiceRequest, ServiceResponse}, http::header::USER_AGENT, FromRequest, HttpResponse, @@ -9,7 +10,6 @@ use futures::future::LocalBoxFuture; use lazy_static::lazy_static; use regex::Regex; -use crate::error::{ApiError, ApiErrorKind}; use crate::server::MetricsWrapper; lazy_static! { @@ -31,14 +31,11 @@ $ .unwrap(); } -pub fn reject_user_agent( +pub fn reject_user_agent( request: ServiceRequest, - service: &mut (impl Service< - Request = ServiceRequest, - Response = ServiceResponse, - Error = actix_web::Error, - > + 'static), -) -> LocalBoxFuture<'static, Result> { + service: &(impl Service, Error = actix_web::Error> + + 'static), +) -> LocalBoxFuture<'static, Result>, actix_web::Error>> { match request.headers().get(USER_AGENT).cloned() { Some(header) if header.to_str().map_or(false, should_reject) => Box::pin(async move { trace!("Rejecting User-Agent: {:?}", header); @@ -47,19 +44,18 @@ pub fn reject_user_agent( .await? .0 .incr("error.rejectua"); - let sreq = ServiceRequest::from_parts(req, payload).map_err(|_| { - ApiError::from(ApiErrorKind::Internal( - "failed to reconstruct ServiceRequest from its parts".to_owned(), - )) - })?; + let sreq = ServiceRequest::from_parts(req, payload); Ok(sreq.into_response( HttpResponse::ServiceUnavailable() - .body("0".to_owned()) - .into_body(), + .body("0") + .map_into_right_body(), )) }), - _ => Box::pin(service.call(request)), + _ => { + let fut = service.call(request); + Box::pin(async move { fut.await.map(|resp| resp.map_into_left_body()) }) + } } } diff --git a/syncserver/src/web/middleware/sentry.rs b/syncserver/src/web/middleware/sentry.rs index 424a8d6323..bc21d40007 100644 --- a/syncserver/src/web/middleware/sentry.rs +++ b/syncserver/src/web/middleware/sentry.rs @@ -30,20 +30,16 @@ pub fn report( sentry::capture_event(event); } -pub fn report_error( +pub fn report_error( request: ServiceRequest, - service: &mut impl Service< - Request = ServiceRequest, - Response = ServiceResponse, - Error = actix_web::Error, - >, -) -> impl Future> { + service: &impl Service, Error = actix_web::Error>, +) -> impl Future, actix_web::Error>> { add_initial_tags(&request, request.head().method.to_string()); add_initial_extras(&request, request.head().uri.to_string()); let fut = service.call(request); - Box::pin(async move { + async move { let mut sresp = fut.await?; let tags = sresp.request().get_tags(); let extras = sresp.request().get_extras(); @@ -84,7 +80,7 @@ pub fn report_error( } } Ok(sresp) - }) + } } fn process_error( @@ -199,7 +195,7 @@ mod tests { let ua = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0"; let req = TestRequest::default() .uri(&uri) - .header(header::USER_AGENT, header::HeaderValue::from_static(ua)) + .insert_header((header::USER_AGENT, header::HeaderValue::from_static(ua))) .to_http_request(); add_initial_tags(&req, "GET".to_owned()); @@ -236,10 +232,10 @@ mod tests { let uri = "/1.5/42/storage/meta/global".to_owned(); let req = TestRequest::default() .uri(&uri) - .header( + .insert_header(( header::USER_AGENT, header::HeaderValue::from_static("Mozilla/5.0 (curl) Gecko/20100101 curl"), - ) + )) .to_http_request(); add_initial_tags(&req, "GET".to_owned()); add_initial_extras(&req, uri); diff --git a/syncserver/src/web/middleware/weave.rs b/syncserver/src/web/middleware/weave.rs index b4652b11f1..5b1def5876 100644 --- a/syncserver/src/web/middleware/weave.rs +++ b/syncserver/src/web/middleware/weave.rs @@ -13,19 +13,15 @@ use crate::error::{ApiError, ApiErrorKind}; use crate::web::DOCKER_FLOW_ENDPOINTS; /// Middleware to set the X-Weave-Timestamp header on all responses. -pub fn set_weave_timestamp( +pub fn set_weave_timestamp( request: ServiceRequest, - service: &mut impl Service< - Request = ServiceRequest, - Response = ServiceResponse, - Error = actix_web::Error, - >, -) -> impl Future> { + service: &impl Service, Error = actix_web::Error>, +) -> impl Future, actix_web::Error>> { let request_path = request.uri().path().to_lowercase(); let ts = SyncTimestamp::default().as_seconds(); let fut = service.call(request); - Box::pin(async move { + async move { if DOCKER_FLOW_ENDPOINTS.contains(&request_path.as_str()) { return fut.await; } @@ -33,7 +29,7 @@ pub fn set_weave_timestamp( let mut resp = fut.await?; insert_weave_timestamp_into_headers(resp.headers_mut(), ts)?; Ok(resp) - }) + } } /// Set a X-Weave-Timestamp header on all responses (depending on the @@ -102,7 +98,7 @@ mod tests { let ts = (Utc::now().timestamp_millis() as u64) - 1000; let hts = format!("{:.*}", 2, ts as f64 / 1_000.0); let mut resp = HttpResponse::build(http::StatusCode::OK) - .header(X_LAST_MODIFIED, hts.clone()) + .insert_header((X_LAST_MODIFIED, hts.clone())) .finish(); insert_weave_timestamp_into_headers(resp.headers_mut(), ts as f64).unwrap(); let weave_hdr = resp @@ -122,7 +118,7 @@ mod tests { let ts = (Utc::now().timestamp_millis() as u64) + 4000; let hts = format!("{:.2}", ts as f64 / 1_000.0); let mut resp = HttpResponse::build(http::StatusCode::OK) - .header(X_LAST_MODIFIED, hts.clone()) + .insert_header((X_LAST_MODIFIED, hts.clone())) .finish(); insert_weave_timestamp_into_headers(resp.headers_mut(), ts as f64 / 1_000.0).unwrap(); let weave_hdr = resp diff --git a/syncserver/src/web/transaction.rs b/syncserver/src/web/transaction.rs index dfbfb7b3f9..13809ceb43 100644 --- a/syncserver/src/web/transaction.rs +++ b/syncserver/src/web/transaction.rs @@ -1,8 +1,7 @@ use std::future::Future; -use actix_http::http::{HeaderValue, Method, StatusCode}; -use actix_http::Error; -use actix_web::dev::{Payload, PayloadStream}; +use actix_http::{header::HeaderValue, BoxedPayloadStream, Error, HttpMessage, Method, StatusCode}; +use actix_web::dev::Payload; use actix_web::http::header; use actix_web::web::Data; use actix_web::{FromRequest, HttpRequest, HttpResponse}; @@ -149,9 +148,8 @@ impl DbTransactionPool { if status != StatusCode::OK { return Ok(HttpResponse::build(status) .content_type("application/json") - .header(X_LAST_MODIFIED, resource_ts.as_header()) - .body("".to_owned()) - .into_body()); + .insert_header((X_LAST_MODIFIED, resource_ts.as_header())) + .body("".to_owned())); }; } @@ -197,11 +195,10 @@ impl DbTransactionPool { } impl FromRequest for DbTransactionPool { - type Error = Error; + type Error = actix_web::Error; type Future = LocalBoxFuture<'static, Result>; - type Config = (); - fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future { + fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future { // Cache in extensions to avoid parsing for the lock info multiple times if let Some(pool) = req.extensions().get::() { return futures::future::ok(pool.clone()).boxed_local(); diff --git a/syncstorage-db/Cargo.toml b/syncstorage-db/Cargo.toml index e937d2e789..13d251e5e6 100644 --- a/syncstorage-db/Cargo.toml +++ b/syncstorage-db/Cargo.toml @@ -26,7 +26,6 @@ syncstorage-db-common = { path = "../syncstorage-db-common" } syncstorage-mysql = { path = "../syncstorage-mysql", optional = true } syncstorage-settings = { path = "../syncstorage-settings" } syncstorage-spanner = { path = "../syncstorage-spanner", optional = true } -# pinning to 0.2.4 due to high number of dependencies (actix, bb8, deadpool, etc.) tokio = { workspace = true, features = ["macros", "sync"] } [features] diff --git a/syncstorage-db/src/lib.rs b/syncstorage-db/src/lib.rs index f7007d1caa..6d6efcc77b 100644 --- a/syncstorage-db/src/lib.rs +++ b/syncstorage-db/src/lib.rs @@ -69,7 +69,7 @@ pub fn spawn_pool_periodic_reporter( .gauge_with_tags("storage.pool.connections.idle", idle_connections as u64) .with_tag("hostname", &hostname) .send(); - time::delay_for(interval).await; + time::sleep(interval).await; } }); diff --git a/syncstorage-spanner/Cargo.toml b/syncstorage-spanner/Cargo.toml index 2cb189ca59..c4babd6964 100644 --- a/syncstorage-spanner/Cargo.toml +++ b/syncstorage-spanner/Cargo.toml @@ -14,11 +14,8 @@ http.workspace = true slog-scope.workspace = true async-trait = "0.1.40" -# Pin to 0.5 for now, to keep it under tokio 0.2 (issue977). -# Fix for #803 (deadpool#92) points to our fork for now -#deadpool = "0.5" # pin to 0.5 google-cloud-rust-raw = { version = "0.16.1", features = ["spanner"] } -deadpool = { git = "https://github.com/mozilla-services/deadpool", branch = "deadpool-v0.5.2-issue92" } +deadpool = { git = "https://github.com/mozilla-services/deadpool", tag = "deadpool-v0.7.0" } form_urlencoded = "1.2" # Some versions of OpenSSL 1.1.1 conflict with grpcio's built-in boringssl which can cause # syncserver to either fail to either compile, or start. In those cases, try diff --git a/tokenserver-auth/Cargo.toml b/tokenserver-auth/Cargo.toml index bc773b4a93..731a613d55 100644 --- a/tokenserver-auth/Cargo.toml +++ b/tokenserver-auth/Cargo.toml @@ -19,8 +19,7 @@ reqwest = { workspace = true, features = ["json", "rustls-tls"] } syncserver-common = { path = "../syncserver-common" } tokenserver-common = { path = "../tokenserver-common" } tokenserver-settings = { path = "../tokenserver-settings" } -# pinning to 0.2.4 due to high number of dependencies (actix, bb8, deadpool, etc.) -tokio = { workspace = true, features = ["blocking"] } +tokio = { workspace = true } [dev-dependencies] mockito = "0.30.0" diff --git a/tokenserver-db/Cargo.toml b/tokenserver-db/Cargo.toml index 16647c1b24..43ff525dbf 100644 --- a/tokenserver-db/Cargo.toml +++ b/tokenserver-db/Cargo.toml @@ -23,7 +23,6 @@ syncserver-db-common = { path = "../syncserver-db-common" } thiserror = "1.0.26" tokenserver-common = { path = "../tokenserver-common" } tokenserver-settings = { path = "../tokenserver-settings" } -# pinning to 0.2.4 due to high number of dependencies (actix, bb8, deadpool, etc.) tokio = { workspace = true, features = ["macros", "sync"] } [dev-dependencies]