From 73f2441d1af28062d0f31aeeaf79f7910cff1a1b Mon Sep 17 00:00:00 2001 From: Mathijs van Veluw Date: Fri, 16 May 2025 18:49:43 +0200 Subject: [PATCH] Update Rust, Crates and Web-Vault (#5860) - Updated web-vault to v2025.5.0 - Updated Rust to v1.87.0 - Updated all the crates - Replaced yubico with yubico_ng - Fixed several new (nightly) clippy lints Signed-off-by: BlackDex --- Cargo.lock | 617 ++++++++---------- Cargo.toml | 30 +- docker/DockerSettings.yaml | 6 +- docker/Dockerfile.alpine | 20 +- docker/Dockerfile.debian | 14 +- macros/Cargo.toml | 2 +- rust-toolchain.toml | 2 +- src/api/admin.rs | 6 +- src/api/core/accounts.rs | 16 +- src/api/core/ciphers.rs | 4 +- src/api/core/emergency_access.rs | 2 +- src/api/core/sends.rs | 4 +- src/api/core/two_factor/authenticator.rs | 4 +- src/api/core/two_factor/duo.rs | 6 +- src/api/core/two_factor/duo_oidc.rs | 6 +- src/api/core/two_factor/email.rs | 6 +- src/api/icons.rs | 34 +- src/api/identity.rs | 24 +- src/api/push.rs | 6 +- src/auth.rs | 6 +- src/config.rs | 16 +- src/db/models/attachment.rs | 4 +- src/db/models/cipher.rs | 2 +- src/db/models/group.rs | 2 +- src/db/models/user.rs | 2 +- src/error.rs | 2 +- src/mail.rs | 24 +- src/main.rs | 13 +- .../templates/scss/vaultwarden.scss.hbs | 2 +- src/util.rs | 16 +- 30 files changed, 418 insertions(+), 480 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c614797f..d6f8b1db 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,14 +19,14 @@ checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "ahash" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", "once_cell", "version_check", - "zerocopy 0.7.35", + "zerocopy", ] [[package]] @@ -111,9 +111,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a194f9d963d8099596278594b3107448656ba73831c9d8c783e613ce86da64" +checksum = "b37fc50485c4f3f736a4fb14199f6d5f5ba008d7f28fe710306c92780f004c07" dependencies = [ "brotli", "flate2", @@ -125,14 +125,15 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" +checksum = "bb812ffb58524bdd10860d7d974e2f01cc0950c2438a74ee5ec2e2280c6c4ffa" dependencies = [ "async-task", "concurrent-queue", "fastrand", "futures-lite", + "pin-project-lite", "slab", ] @@ -200,17 +201,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "async-recursion" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "async-signal" version = "0.2.10" @@ -324,9 +314,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" -version = "0.3.74" +version = "0.3.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" dependencies = [ "addr2line", "cfg-if", @@ -382,9 +372,9 @@ checksum = "383d29d513d8764dcdc42ea295d979eb99c3c9f00607b3692cf68a431f7dca72" [[package]] name = "bitflags" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" [[package]] name = "blake2" @@ -419,9 +409,9 @@ dependencies = [ [[package]] name = "brotli" -version = "7.0.0" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd" +checksum = "9991eea70ea4f293524138648e41ee89b0b2b12ddef3b255effa43c8056e0e0d" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -430,9 +420,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "4.0.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74fa05ad7d803d413eb8380983b092cbbaf9a85f151b871360e7b00cd7060b37" +checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -446,9 +436,9 @@ checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "bytemuck" -version = "1.22.0" +version = "1.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6b1fc10dbac614ebc03540c9dbd60e83887fda27794998c6528f1782047d540" +checksum = "9134a6ef01ce4b366b50689c94f82c14bc72bc5d0386829828a2e2752ef7958c" [[package]] name = "byteorder" @@ -500,9 +490,9 @@ checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0" [[package]] name = "cc" -version = "1.2.18" +version = "1.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525046617d8376e3db1deffb079e91cef90a89fc3ca5c185bbf8c9ecdd15cd5c" +checksum = "5f4ac86a9e5bc1e2b3449ab9d7d3a6a405e3d1bb28d7b9be8614f55846ae3766" dependencies = [ "shlex", ] @@ -515,9 +505,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" +checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" dependencies = [ "android-tzdata", "iana-time-zone", @@ -643,13 +633,13 @@ checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" [[package]] name = "cron" -version = "0.12.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f8c3e73077b4b4a6ab1ea5047c37c57aee77657bc8ecd6f29b0af082d0b0c07" +checksum = "5877d3fbf742507b66bc2a1945106bd30dd8504019d596901ddd012a4dd01740" dependencies = [ "chrono", - "nom 7.1.3", "once_cell", + "winnow 0.6.26", ] [[package]] @@ -737,9 +727,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "575f75dfd25738df5b91b8e43e14d44bda14637a58fae779fd2b064f8bf3e010" +checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" [[package]] name = "data-url" @@ -843,9 +833,9 @@ dependencies = [ [[package]] name = "diesel" -version = "2.2.9" +version = "2.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34d3950690ba3a6910126162b47e775e203006d4242a15de912bec6c0a695153" +checksum = "ff3e1edb1f37b4953dd5176916347289ed43d7119cc2e6c7c3f7849ff44ea506" dependencies = [ "bigdecimal", "bitflags", @@ -878,9 +868,9 @@ dependencies = [ [[package]] name = "diesel_derives" -version = "2.2.4" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a93958254b70bea63b4187ff73d10180599d9d8d177071b7f91e6da4e0c0ad55" +checksum = "68d4216021b3ea446fd2047f5c8f8fe6e98af34508a254a01e4d6bc1e844f84d" dependencies = [ "diesel_table_macro_syntax", "dsl_auto_type", @@ -978,9 +968,9 @@ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "email-encoding" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20b9cde6a71f9f758440470f3de16db6c09a02c443ce66850d87f5410548fb8e" +checksum = "9298e6504d9b9e780ed3f7dfd43a61be8cd0e09eb07f7706a945b0072b6670b6" dependencies = [ "base64 0.22.1", "memchr", @@ -1030,9 +1020,9 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" +checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" dependencies = [ "libc", "windows-sys 0.59.0", @@ -1266,15 +1256,16 @@ dependencies = [ [[package]] name = "generator" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6bd114ceda131d3b1d665eba35788690ad37f5916457286b32ab6fd3c438dd" +checksum = "d18470a76cb7f8ff746cf1f7470914f900252ec36bbc40b569d74b1258446827" dependencies = [ + "cc", "cfg-if", "libc", "log", "rustversion", - "windows 0.58.0", + "windows 0.61.1", ] [[package]] @@ -1289,9 +1280,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "js-sys", @@ -1302,9 +1293,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", "js-sys", @@ -1349,13 +1340,13 @@ dependencies = [ "futures-sink", "futures-timer", "futures-util", - "getrandom 0.3.2", - "hashbrown 0.15.2", + "getrandom 0.3.3", + "hashbrown 0.15.3", "nonzero_ext", "parking_lot", "portable-atomic", "quanta", - "rand 0.9.0", + "rand 0.9.1", "smallvec", "spinning_top", "web-time", @@ -1376,9 +1367,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.8" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2" +checksum = "a9421a676d1b147b16b82c9225157dc629087ef8ec4d5e2960f9437a90dac0a5" dependencies = [ "atomic-waker", "bytes", @@ -1428,9 +1419,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.2" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" dependencies = [ "allocator-api2", "equivalent", @@ -1457,20 +1448,18 @@ checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" [[package]] name = "hermit-abi" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbd780fe5cc30f81464441920d82ac8740e2e46b29a6fad543ddd075229ce37e" +checksum = "f154ce46856750ed433c8649605bf7ed2de3bc35fd9d2a9f30cddd873c80cb08" [[package]] name = "hickory-proto" -version = "0.25.1" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d844af74f7b799e41c78221be863bade11c430d46042c3b49ca8ae0c6d27287" +checksum = "f8a6fe56c0038198998a6f217ca4e7ef3a5e51f46163bd6dd60b5c71ca6c6502" dependencies = [ - "async-recursion", "async-trait", "cfg-if", - "critical-section", "data-encoding", "enum-as-inner", "futures-channel", @@ -1479,7 +1468,7 @@ dependencies = [ "idna", "ipnet", "once_cell", - "rand 0.9.0", + "rand 0.9.1", "ring", "thiserror 2.0.12", "tinyvec", @@ -1490,9 +1479,9 @@ dependencies = [ [[package]] name = "hickory-resolver" -version = "0.25.1" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a128410b38d6f931fcc6ca5c107a3b02cabd6c05967841269a4ad65d23c44331" +checksum = "dc62a9a99b0bfb44d2ab95a7208ac952d31060efc16241c87eaf36406fecf87a" dependencies = [ "cfg-if", "futures-util", @@ -1501,7 +1490,7 @@ dependencies = [ "moka", "once_cell", "parking_lot", - "rand 0.9.0", + "rand 0.9.1", "resolv-conf", "smallvec", "thiserror 2.0.12", @@ -1659,7 +1648,7 @@ dependencies = [ "http 1.3.1", "hyper 1.6.0", "hyper-util", - "rustls 0.23.25", + "rustls 0.23.27", "rustls-pki-types", "tokio", "tokio-rustls 0.26.2", @@ -1714,7 +1703,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core 0.61.0", + "windows-core", ] [[package]] @@ -1728,21 +1717,22 @@ dependencies = [ [[package]] name = "icu_collections" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" dependencies = [ "displaydoc", + "potential_utf", "yoke", "zerofrom", "zerovec", ] [[package]] -name = "icu_locid" -version = "1.5.0" +name = "icu_locale_core" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" dependencies = [ "displaydoc", "litemap", @@ -1751,31 +1741,11 @@ dependencies = [ "zerovec", ] -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d" - [[package]] name = "icu_normalizer" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" dependencies = [ "displaydoc", "icu_collections", @@ -1783,67 +1753,54 @@ dependencies = [ "icu_properties", "icu_provider", "smallvec", - "utf16_iter", - "utf8_iter", - "write16", "zerovec", ] [[package]] name = "icu_normalizer_data" -version = "1.5.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e8338228bdc8ab83303f16b797e177953730f601a96c25d10cb3ab0daa0cb7" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" [[package]] name = "icu_properties" -version = "1.5.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +checksum = "2549ca8c7241c82f59c80ba2a6f415d931c5b58d24fb8412caa1a1f02c49139a" dependencies = [ "displaydoc", "icu_collections", - "icu_locid_transform", + "icu_locale_core", "icu_properties_data", "icu_provider", - "tinystr", + "potential_utf", + "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" -version = "1.5.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2" +checksum = "8197e866e47b68f8f7d95249e172903bec06004b18b2937f1095d40a0c57de04" [[package]] name = "icu_provider" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" dependencies = [ "displaydoc", - "icu_locid", - "icu_provider_macros", + "icu_locale_core", "stable_deref_trait", "tinystr", "writeable", "yoke", "zerofrom", + "zerotrie", "zerovec", ] -[[package]] -name = "icu_provider_macros" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "ident_case" version = "1.0.1" @@ -1863,9 +1820,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" dependencies = [ "icu_normalizer", "icu_properties", @@ -1878,7 +1835,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", - "hashbrown 0.15.2", + "hashbrown 0.15.3", "serde", ] @@ -1912,7 +1869,7 @@ version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ - "hermit-abi 0.5.0", + "hermit-abi 0.5.1", "libc", "windows-sys 0.59.0", ] @@ -1931,9 +1888,9 @@ checksum = "47f142fe24a9c9944451e8349de0a56af5f3e7226dc46f3ed4d4ecc0b85af75e" [[package]] name = "job_scheduler_ng" -version = "2.0.5" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87c252207f323e2996d087759ebdcff8f608cd3eaa9896909a0c2dd3050a3c6a" +checksum = "b6d2655e8c656a1d51c0464ad9cfd19312e3f3ea61326d26a3400323a6cb9a28" dependencies = [ "chrono", "cron", @@ -1991,9 +1948,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lettre" -version = "0.11.15" +version = "0.11.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759bc2b8eabb6a30b235d6f716f7f36479f4b38cbe65b8747aefee51f89e8437" +checksum = "87ffd14fa289730e3ad68edefdc31f603d56fe716ec38f2076bb7410e09147c2" dependencies = [ "async-std", "async-trait", @@ -2022,15 +1979,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.171" +version = "0.2.172" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" +checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" [[package]] name = "libm" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "libmimalloc-sys" @@ -2044,9 +2001,9 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb8270bb4060bd76c6e96f20c52d80620f1d82a3470885694e41e0f81ef6fe7" +checksum = "947e6816f7825b2b45027c2c32e7085da9934defa535de4a6a46b10a4d5257fa" dependencies = [ "cc", "pkg-config", @@ -2067,9 +2024,9 @@ checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" [[package]] name = "litemap" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] name = "litrs" @@ -2118,7 +2075,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" dependencies = [ "cfg-if", - "generator 0.8.4", + "generator 0.8.5", "scoped-tls", "tracing", "tracing-subscriber", @@ -2451,9 +2408,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.107" +version = "0.9.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8288979acd84749c744a9014b4382d42b8f7b2592847b5afb2ed29e5d16ede07" +checksum = "e145e1651e858e820e4860f7b9c5e169bc1d8ce1c86043be79fa7b7634821847" dependencies = [ "cc", "libc", @@ -2721,6 +2678,15 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" +[[package]] +name = "potential_utf" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +dependencies = [ + "zerovec", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -2733,7 +2699,7 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ - "zerocopy 0.8.24", + "zerocopy", ] [[package]] @@ -2748,9 +2714,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] @@ -2776,9 +2742,9 @@ checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac" [[package]] name = "psm" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f58e5423e24c18cc840e1c98370b3993c6649cd1678b4d24318bcf0a083cbe88" +checksum = "6e944464ec8536cd1beb0bbfd96987eb5e3b72f2ecdafdc5c769a37f1fa2ae1f" dependencies = [ "cc", ] @@ -2853,13 +2819,12 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", - "zerocopy 0.8.24", ] [[package]] @@ -2888,7 +2853,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.2.16", ] [[package]] @@ -2897,7 +2862,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.3.2", + "getrandom 0.3.3", ] [[package]] @@ -2911,9 +2876,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.11" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2f103c6d277498fbceb16e84d317e2a400f160f46904d5f5410848c829511a3" +checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" dependencies = [ "bitflags", ] @@ -3046,12 +3011,9 @@ dependencies = [ [[package]] name = "resolv-conf" -version = "0.7.1" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48375394603e3dd4b2d64371f7148fd8c7baa2680e28741f2cb8d23b59e3d4c4" -dependencies = [ - "hostname", -] +checksum = "95325155c684b1c89f7765e30bc1c42e4a6da51ca513615660cb8a62ef9a88e3" [[package]] name = "ring" @@ -3061,7 +3023,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.15", + "getrandom 0.2.16", "libc", "untrusted", "windows-sys 0.52.0", @@ -3185,23 +3147,23 @@ dependencies = [ [[package]] name = "rpassword" -version = "7.3.1" +version = "7.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" +checksum = "66d4c8b64f049c6721ec8ccec37ddfc3d641c4a7fca57e8f2a89de509c73df39" dependencies = [ "libc", "rtoolbox", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] name = "rtoolbox" -version = "0.0.2" +version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" +checksum = "a7cc970b249fbe527d6e02e0a227762c9108b2f49d81094fe357ffc6d14d7f6f" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3234,9 +3196,9 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.5" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf" +checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" dependencies = [ "bitflags", "errno", @@ -3259,13 +3221,13 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.25" +version = "0.23.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "822ee9188ac4ec04a2f0531e55d035fb2de73f18b41a63c70c2712503b6fb13c" +checksum = "730944ca083c1c233a75c09f199e973ca499344a2b7ba9e755c457e86fb4a321" dependencies = [ "once_cell", "rustls-pki-types", - "rustls-webpki 0.103.1", + "rustls-webpki 0.103.3", "subtle", "zeroize", ] @@ -3290,9 +3252,12 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +dependencies = [ + "zeroize", +] [[package]] name = "rustls-webpki" @@ -3306,9 +3271,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.1" +version = "0.103.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fef8b8769aaccf73098557a87cd1816b4f9c7c16811c9c77142aa695c16f2c03" +checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" dependencies = [ "ring", "rustls-pki-types", @@ -3481,9 +3446,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.8" +version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", "cpufeatures", @@ -3507,9 +3472,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2" dependencies = [ "libc", "signal-hook-registry", @@ -3517,9 +3482,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" dependencies = [ "libc", ] @@ -3599,9 +3564,9 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "stacker" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601f9201feb9b09c00266478bf459952b9ef9a6b94edb2f21eba14ab681a60a9" +checksum = "cddb07e32ddb770749da91081d8d0ac3a16f1a569a18b20348cd371f5dead06b" dependencies = [ "cc", "cfg-if", @@ -3633,9 +3598,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.100" +version = "2.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" dependencies = [ "proc-macro2", "quote", @@ -3653,9 +3618,9 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", @@ -3703,14 +3668,14 @@ checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" [[package]] name = "tempfile" -version = "3.19.1" +version = "3.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" +checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" dependencies = [ "fastrand", - "getrandom 0.3.2", + "getrandom 0.3.3", "once_cell", - "rustix 1.0.5", + "rustix 1.0.7", "windows-sys 0.59.0", ] @@ -3808,9 +3773,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.7.6" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" dependencies = [ "displaydoc", "zerovec", @@ -3833,9 +3798,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.44.2" +version = "1.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" +checksum = "2513ca694ef9ede0fb23fe71a4ee4107cb102b9dc1930f6d0fd77aae068ae165" dependencies = [ "backtrace", "bytes", @@ -3886,7 +3851,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" dependencies = [ - "rustls 0.23.25", + "rustls 0.23.27", "tokio", ] @@ -3927,9 +3892,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.14" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b9590b93e6fcc1739458317cccd391ad3955e2bde8913edf6f95f9e65a8f034" +checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" dependencies = [ "bytes", "futures-core", @@ -3940,9 +3905,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.20" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" +checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae" dependencies = [ "serde", "serde_spanned", @@ -3952,26 +3917,33 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.24" +version = "0.22.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" +checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow", + "toml_write", + "winnow 0.7.10", ] +[[package]] +name = "toml_write" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfb942dfe1d8e29a7ee7fcbde5bd2b9a25fb89aa70caea2eba3bee836ff41076" + [[package]] name = "totp-lite" version = "2.0.1" @@ -4165,12 +4137,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" -[[package]] -name = "utf16_iter" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" - [[package]] name = "utf8_iter" version = "1.0.4" @@ -4183,7 +4149,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" dependencies = [ - "getrandom 0.3.2", + "getrandom 0.3.3", ] [[package]] @@ -4241,7 +4207,7 @@ dependencies = [ "pastey", "percent-encoding", "pico-args", - "rand 0.9.0", + "rand 0.9.1", "regex", "reqwest", "ring", @@ -4262,7 +4228,7 @@ dependencies = [ "uuid", "webauthn-rs", "which", - "yubico", + "yubico_ng", ] [[package]] @@ -4442,7 +4408,7 @@ checksum = "24d643ce3fd3e5b54854602a080f34fb10ab75e0b813ee32d00ca2b44fa74762" dependencies = [ "either", "env_home", - "rustix 1.0.5", + "rustix 1.0.7", "winsafe", ] @@ -4494,49 +4460,48 @@ dependencies = [ [[package]] name = "windows" -version = "0.58.0" +version = "0.61.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +checksum = "c5ee8f3d025738cb02bad7868bbb5f8a6327501e870bf51f1b455b0a2454a419" dependencies = [ - "windows-core 0.58.0", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-core" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" -dependencies = [ - "windows-implement 0.58.0", - "windows-interface 0.58.0", - "windows-result 0.2.0", - "windows-strings 0.1.0", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-core" -version = "0.61.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" -dependencies = [ - "windows-implement 0.60.0", - "windows-interface 0.59.1", + "windows-collections", + "windows-core", + "windows-future", "windows-link", - "windows-result 0.3.2", - "windows-strings 0.4.0", + "windows-numerics", ] [[package]] -name = "windows-implement" -version = "0.58.0" +name = "windows-collections" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" dependencies = [ - "proc-macro2", - "quote", - "syn", + "windows-core", +] + +[[package]] +name = "windows-core" +version = "0.61.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46ec44dc15085cea82cf9c78f85a9114c463a369786585ad2882d1ff0b0acf40" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings 0.4.1", +] + +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core", + "windows-link", + "windows-threading", ] [[package]] @@ -4550,17 +4515,6 @@ dependencies = [ "syn", ] -[[package]] -name = "windows-interface" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "windows-interface" version = "0.59.1" @@ -4578,45 +4532,36 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core", + "windows-link", +] + [[package]] name = "windows-registry" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" dependencies = [ - "windows-result 0.3.2", + "windows-result", "windows-strings 0.3.1", "windows-targets 0.53.0", ] [[package]] name = "windows-result" -version = "0.2.0" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-result" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" +checksum = "4b895b5356fc36103d0f64dd1e94dfa7ac5633f1c9dd6e80fe9ec4adef69e09d" dependencies = [ "windows-link", ] -[[package]] -name = "windows-strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" -dependencies = [ - "windows-result 0.2.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows-strings" version = "0.3.1" @@ -4628,9 +4573,9 @@ dependencies = [ [[package]] name = "windows-strings" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" +checksum = "2a7ab927b2637c19b3dbe0965e75d8f2d30bdd697a1516191cad2ec4df8fb28a" dependencies = [ "windows-link", ] @@ -4709,6 +4654,15 @@ dependencies = [ "windows_x86_64_msvc 0.53.0", ] +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -4849,9 +4803,18 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winnow" -version = "0.7.6" +version = "0.6.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63d3fcd9bba44b03821e7d699eeee959f3126dcc4aa8e4ae18ec617c2a5cea10" +checksum = "1e90edd2ac1aa278a5c4599b1d89cf03074b610800f866d4026dc199d7929a28" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06928c8748d81b05c9be96aad92e1b6ff01833332f281e8cfca3be4b35fc9ec" dependencies = [ "memchr", ] @@ -4881,17 +4844,11 @@ dependencies = [ "bitflags", ] -[[package]] -name = "write16" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" - [[package]] name = "writeable" -version = "0.5.5" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" [[package]] name = "yansi" @@ -4904,9 +4861,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" dependencies = [ "serde", "stable_deref_trait", @@ -4916,9 +4873,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", @@ -4927,15 +4884,16 @@ dependencies = [ ] [[package]] -name = "yubico" -version = "0.12.0" -source = "git+https://github.com/BlackDex/yubico-rs?rev=00df14811f58155c0f02e3ab10f1570ed3e115c6#00df14811f58155c0f02e3ab10f1570ed3e115c6" +name = "yubico_ng" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65da03f12c539759fb540bf4fa943d50eb2387de9ed62eda9fb8f6f6bc063a9d" dependencies = [ "base64 0.22.1", "form_urlencoded", "futures", "hmac", - "rand 0.8.5", + "rand 0.9.1", "reqwest", "sha1", "threadpool", @@ -4943,38 +4901,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.35" +version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" dependencies = [ - "zerocopy-derive 0.7.35", -] - -[[package]] -name = "zerocopy" -version = "0.8.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" -dependencies = [ - "zerocopy-derive 0.8.24", + "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.35" +version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" +checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" dependencies = [ "proc-macro2", "quote", @@ -5009,10 +4947,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] -name = "zerovec" -version = "0.10.4" +name = "zerotrie" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" dependencies = [ "yoke", "zerofrom", @@ -5021,9 +4970,9 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.10.3" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 6745edd2..119ecd1e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ name = "vaultwarden" version = "1.0.0" authors = ["Daniel GarcĂ­a "] edition = "2021" -rust-version = "1.84.0" +rust-version = "1.85.0" resolver = "2" repository = "https://github.com/dani-garcia/vaultwarden" @@ -72,14 +72,14 @@ dashmap = "6.1.0" # Async futures futures = "0.3.31" -tokio = { version = "1.44.2", features = ["rt-multi-thread", "fs", "io-util", "parking_lot", "time", "signal", "net"] } +tokio = { version = "1.45.0", features = ["rt-multi-thread", "fs", "io-util", "parking_lot", "time", "signal", "net"] } # A generic serialization/deserialization framework serde = { version = "1.0.219", features = ["derive"] } serde_json = "1.0.140" # A safe, extensible ORM and Query builder -diesel = { version = "2.2.9", features = ["chrono", "r2d2", "numeric"] } +diesel = { version = "2.2.10", features = ["chrono", "r2d2", "numeric"] } diesel_migrations = "2.2.0" diesel_logger = { version = "0.4.0", optional = true } @@ -87,10 +87,10 @@ derive_more = { version = "2.0.1", features = ["from", "into", "as_ref", "deref" diesel-derive-newtype = "2.1.2" # Bundled/Static SQLite -libsqlite3-sys = { version = "0.32.0", features = ["bundled"], optional = true } +libsqlite3-sys = { version = "0.33.0", features = ["bundled"], optional = true } # Crypto-related libraries -rand = "0.9.0" +rand = "0.9.1" ring = "0.17.14" subtle = "2.6.1" @@ -98,15 +98,15 @@ subtle = "2.6.1" uuid = { version = "1.16.0", features = ["v4"] } # Date and time libraries -chrono = { version = "0.4.40", features = ["clock", "serde"], default-features = false } +chrono = { version = "0.4.41", features = ["clock", "serde"], default-features = false } chrono-tz = "0.10.3" time = "0.3.41" # Job scheduler -job_scheduler_ng = "2.0.5" +job_scheduler_ng = "2.2.0" # Data encoding library Hex/Base32/Base64 -data-encoding = "2.8.0" +data-encoding = "2.9.0" # JWT library jsonwebtoken = "9.3.1" @@ -115,7 +115,7 @@ jsonwebtoken = "9.3.1" totp-lite = "2.0.1" # Yubico Library -yubico = { version = "0.12.0", features = ["online-tokio"], default-features = false } +yubico = { package = "yubico_ng", version = "0.13.0", features = ["online-tokio"], default-features = false } # WebAuthn libraries webauthn-rs = "0.3.2" @@ -124,7 +124,7 @@ webauthn-rs = "0.3.2" url = "2.5.4" # Email libraries -lettre = { version = "0.11.15", features = ["smtp-transport", "sendmail-transport", "builder", "serde", "tokio1-native-tls", "hostname", "tracing", "tokio1"], default-features = false } +lettre = { version = "0.11.16", features = ["smtp-transport", "sendmail-transport", "builder", "serde", "tokio1-native-tls", "hostname", "tracing", "tokio1"], default-features = false } percent-encoding = "2.3.1" # URL encoding library used for URL's in the emails email_address = "0.2.9" @@ -133,7 +133,7 @@ handlebars = { version = "6.3.2", features = ["dir_source"] } # HTTP client (Used for favicons, version check, DUO and HIBP API) reqwest = { version = "0.12.15", features = ["native-tls-alpn", "stream", "json", "gzip", "brotli", "socks", "cookies"] } -hickory-resolver = "0.25.1" +hickory-resolver = "0.25.2" # Favicon extraction libraries html5gum = "0.7.0" @@ -171,17 +171,13 @@ which = "7.0.3" argon2 = "0.5.3" # Reading a password from the cli for generating the Argon2id ADMIN_TOKEN -rpassword = "7.3.1" +rpassword = "7.4.0" # Loading a dynamic CSS Stylesheet grass_compiler = { version = "0.13.4", default-features = false } -[patch.crates-io] -# Patch yubico to remove duplicate crates of older versions -yubico = { git = "https://github.com/BlackDex/yubico-rs", rev = "00df14811f58155c0f02e3ab10f1570ed3e115c6" } - # Strip debuginfo from the release builds -# The symbols are the provide better panic traces +# The debug symbols are to provide better panic traces # Also enable fat LTO and use 1 codegen unit for optimizations [profile.release] strip = "debuginfo" diff --git a/docker/DockerSettings.yaml b/docker/DockerSettings.yaml index db7592b5..153218f9 100644 --- a/docker/DockerSettings.yaml +++ b/docker/DockerSettings.yaml @@ -1,11 +1,11 @@ --- -vault_version: "v2025.3.1" -vault_image_digest: "sha256:5b11739052c26dc3c2135b28dc5b072bc607f870a3e81fbbcc72e0cd1f124bcd" +vault_version: "v2025.5.0" +vault_image_digest: "sha256:a0a377b810e66a4ebf1416f732d2be06f3262bf5a5238695af88d3ec6871cc0e" # Cross Compile Docker Helper Scripts v1.6.1 # We use the linux/amd64 platform shell scripts since there is no difference between the different platform scripts # https://github.com/tonistiigi/xx | https://hub.docker.com/r/tonistiigi/xx/tags xx_image_digest: "sha256:9c207bead753dda9430bdd15425c6518fc7a03d866103c516a2c6889188f5894" -rust_version: 1.86.0 # Rust version to be used +rust_version: 1.87.0 # Rust version to be used debian_version: bookworm # Debian release name to be used alpine_version: "3.21" # Alpine version to be used # For which platforms/architectures will we try to build images diff --git a/docker/Dockerfile.alpine b/docker/Dockerfile.alpine index bf0614ec..8973c74d 100644 --- a/docker/Dockerfile.alpine +++ b/docker/Dockerfile.alpine @@ -19,23 +19,23 @@ # - From https://hub.docker.com/r/vaultwarden/web-vault/tags, # click the tag name to view the digest of the image it currently points to. # - From the command line: -# $ docker pull docker.io/vaultwarden/web-vault:v2025.3.1 -# $ docker image inspect --format "{{.RepoDigests}}" docker.io/vaultwarden/web-vault:v2025.3.1 -# [docker.io/vaultwarden/web-vault@sha256:5b11739052c26dc3c2135b28dc5b072bc607f870a3e81fbbcc72e0cd1f124bcd] +# $ docker pull docker.io/vaultwarden/web-vault:v2025.5.0 +# $ docker image inspect --format "{{.RepoDigests}}" docker.io/vaultwarden/web-vault:v2025.5.0 +# [docker.io/vaultwarden/web-vault@sha256:a0a377b810e66a4ebf1416f732d2be06f3262bf5a5238695af88d3ec6871cc0e] # # - Conversely, to get the tag name from the digest: -# $ docker image inspect --format "{{.RepoTags}}" docker.io/vaultwarden/web-vault@sha256:5b11739052c26dc3c2135b28dc5b072bc607f870a3e81fbbcc72e0cd1f124bcd -# [docker.io/vaultwarden/web-vault:v2025.3.1] +# $ docker image inspect --format "{{.RepoTags}}" docker.io/vaultwarden/web-vault@sha256:a0a377b810e66a4ebf1416f732d2be06f3262bf5a5238695af88d3ec6871cc0e +# [docker.io/vaultwarden/web-vault:v2025.5.0] # -FROM --platform=linux/amd64 docker.io/vaultwarden/web-vault@sha256:5b11739052c26dc3c2135b28dc5b072bc607f870a3e81fbbcc72e0cd1f124bcd AS vault +FROM --platform=linux/amd64 docker.io/vaultwarden/web-vault@sha256:a0a377b810e66a4ebf1416f732d2be06f3262bf5a5238695af88d3ec6871cc0e AS vault ########################## ALPINE BUILD IMAGES ########################## ## NOTE: The Alpine Base Images do not support other platforms then linux/amd64 ## And for Alpine we define all build images here, they will only be loaded when actually used -FROM --platform=linux/amd64 ghcr.io/blackdex/rust-musl:x86_64-musl-stable-1.86.0 AS build_amd64 -FROM --platform=linux/amd64 ghcr.io/blackdex/rust-musl:aarch64-musl-stable-1.86.0 AS build_arm64 -FROM --platform=linux/amd64 ghcr.io/blackdex/rust-musl:armv7-musleabihf-stable-1.86.0 AS build_armv7 -FROM --platform=linux/amd64 ghcr.io/blackdex/rust-musl:arm-musleabi-stable-1.86.0 AS build_armv6 +FROM --platform=linux/amd64 ghcr.io/blackdex/rust-musl:x86_64-musl-stable-1.87.0 AS build_amd64 +FROM --platform=linux/amd64 ghcr.io/blackdex/rust-musl:aarch64-musl-stable-1.87.0 AS build_arm64 +FROM --platform=linux/amd64 ghcr.io/blackdex/rust-musl:armv7-musleabihf-stable-1.87.0 AS build_armv7 +FROM --platform=linux/amd64 ghcr.io/blackdex/rust-musl:arm-musleabi-stable-1.87.0 AS build_armv6 ########################## BUILD IMAGE ########################## # hadolint ignore=DL3006 diff --git a/docker/Dockerfile.debian b/docker/Dockerfile.debian index da9a18c5..0e366bea 100644 --- a/docker/Dockerfile.debian +++ b/docker/Dockerfile.debian @@ -19,15 +19,15 @@ # - From https://hub.docker.com/r/vaultwarden/web-vault/tags, # click the tag name to view the digest of the image it currently points to. # - From the command line: -# $ docker pull docker.io/vaultwarden/web-vault:v2025.3.1 -# $ docker image inspect --format "{{.RepoDigests}}" docker.io/vaultwarden/web-vault:v2025.3.1 -# [docker.io/vaultwarden/web-vault@sha256:5b11739052c26dc3c2135b28dc5b072bc607f870a3e81fbbcc72e0cd1f124bcd] +# $ docker pull docker.io/vaultwarden/web-vault:v2025.5.0 +# $ docker image inspect --format "{{.RepoDigests}}" docker.io/vaultwarden/web-vault:v2025.5.0 +# [docker.io/vaultwarden/web-vault@sha256:a0a377b810e66a4ebf1416f732d2be06f3262bf5a5238695af88d3ec6871cc0e] # # - Conversely, to get the tag name from the digest: -# $ docker image inspect --format "{{.RepoTags}}" docker.io/vaultwarden/web-vault@sha256:5b11739052c26dc3c2135b28dc5b072bc607f870a3e81fbbcc72e0cd1f124bcd -# [docker.io/vaultwarden/web-vault:v2025.3.1] +# $ docker image inspect --format "{{.RepoTags}}" docker.io/vaultwarden/web-vault@sha256:a0a377b810e66a4ebf1416f732d2be06f3262bf5a5238695af88d3ec6871cc0e +# [docker.io/vaultwarden/web-vault:v2025.5.0] # -FROM --platform=linux/amd64 docker.io/vaultwarden/web-vault@sha256:5b11739052c26dc3c2135b28dc5b072bc607f870a3e81fbbcc72e0cd1f124bcd AS vault +FROM --platform=linux/amd64 docker.io/vaultwarden/web-vault@sha256:a0a377b810e66a4ebf1416f732d2be06f3262bf5a5238695af88d3ec6871cc0e AS vault ########################## Cross Compile Docker Helper Scripts ########################## ## We use the linux/amd64 no matter which Build Platform, since these are all bash scripts @@ -36,7 +36,7 @@ FROM --platform=linux/amd64 docker.io/tonistiigi/xx@sha256:9c207bead753dda9430bd ########################## BUILD IMAGE ########################## # hadolint ignore=DL3006 -FROM --platform=$BUILDPLATFORM docker.io/library/rust:1.86.0-slim-bookworm AS build +FROM --platform=$BUILDPLATFORM docker.io/library/rust:1.87.0-slim-bookworm AS build COPY --from=xx / / ARG TARGETARCH ARG TARGETVARIANT diff --git a/macros/Cargo.toml b/macros/Cargo.toml index eb4aeb7d..2231a6ee 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -10,7 +10,7 @@ proc-macro = true [dependencies] quote = "1.0.40" -syn = "2.0.100" +syn = "2.0.101" [lints] workspace = true diff --git a/rust-toolchain.toml b/rust-toolchain.toml index fc3bb9b9..c1ab6b32 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.86.0" +channel = "1.87.0" components = [ "rustfmt", "clippy" ] profile = "minimal" diff --git a/src/api/admin.rs b/src/api/admin.rs index 4669cb3d..505765d6 100644 --- a/src/api/admin.rs +++ b/src/api/admin.rs @@ -102,7 +102,7 @@ const ACTING_ADMIN_USER: &str = "vaultwarden-admin-00000-000000000000"; pub const FAKE_ADMIN_UUID: &str = "00000000-0000-0000-0000-000000000000"; fn admin_path() -> String { - format!("{}{}", CONFIG.domain_path(), ADMIN_PATH) + format!("{}{ADMIN_PATH}", CONFIG.domain_path()) } #[derive(Debug)] @@ -206,7 +206,7 @@ fn post_admin_login( cookies.add(cookie); if let Some(redirect) = redirect { - Ok(Redirect::to(format!("{}{}", admin_path(), redirect))) + Ok(Redirect::to(format!("{}{redirect}", admin_path()))) } else { Err(AdminResponse::Ok(render_admin_page())) } @@ -427,7 +427,7 @@ async fn deauth_user(user_id: UserId, _token: AdminToken, mut conn: DbConn, nt: for device in Device::find_push_devices_by_user(&user.uuid, &mut conn).await { match unregister_push_device(device.push_uuid).await { Ok(r) => r, - Err(e) => error!("Unable to unregister devices from Bitwarden server: {}", e), + Err(e) => error!("Unable to unregister devices from Bitwarden server: {e}"), }; } } diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs index e751954b..07947b67 100644 --- a/src/api/core/accounts.rs +++ b/src/api/core/accounts.rs @@ -301,11 +301,11 @@ pub async fn _register(data: Json, email_verification: bool, mut c if CONFIG.mail_enabled() { if CONFIG.signups_verify() && !email_verified { if let Err(e) = mail::send_welcome_must_verify(&user.email, &user.uuid).await { - error!("Error sending welcome email: {:#?}", e); + error!("Error sending welcome email: {e:#?}"); } user.last_verifying_at = Some(user.created_at); } else if let Err(e) = mail::send_welcome(&user.email).await { - error!("Error sending welcome email: {:#?}", e); + error!("Error sending welcome email: {e:#?}"); } if email_verified && is_email_2fa_required(data.organization_user_id, &mut conn).await { @@ -788,10 +788,10 @@ async fn post_email_token(data: Json, headers: Headers, mut conn if CONFIG.mail_enabled() { if let Err(e) = mail::send_change_email(&data.new_email, &token).await { - error!("Error sending change-email email: {:#?}", e); + error!("Error sending change-email email: {e:#?}"); } } else { - debug!("Email change request for user ({}) to email ({}) with token ({})", user.uuid, data.new_email, token); + debug!("Email change request for user ({}) to email ({}) with token ({token})", user.uuid, data.new_email); } user.email_new = Some(data.new_email); @@ -873,7 +873,7 @@ async fn post_verify_email(headers: Headers) -> EmptyResult { } if let Err(e) = mail::send_verify_email(&user.email, &user.uuid).await { - error!("Error sending verify_email email: {:#?}", e); + error!("Error sending verify_email email: {e:#?}"); } Ok(()) @@ -904,7 +904,7 @@ async fn post_verify_email_token(data: Json, mut conn: DbC user.last_verifying_at = None; user.login_verify_count = 0; if let Err(e) = user.save(&mut conn).await { - error!("Error saving email verification: {:#?}", e); + error!("Error saving email verification: {e:#?}"); } Ok(()) @@ -923,7 +923,7 @@ async fn post_delete_recover(data: Json, mut conn: DbConn) -> if CONFIG.mail_enabled() { if let Some(user) = User::find_by_mail(&data.email, &mut conn).await { if let Err(e) = mail::send_delete_account(&user.email, &user.uuid).await { - error!("Error sending delete account email: {:#?}", e); + error!("Error sending delete account email: {e:#?}"); } } Ok(()) @@ -1202,7 +1202,7 @@ async fn put_device_token( if device.is_registered() { // check if the new token is the same as the registered token if device.push_token.is_some() && device.push_token.unwrap() == token.clone() { - debug!("Device {} is already registered and token is the same", device_id); + debug!("Device {device_id} is already registered and token is the same"); return Ok(()); } else { // Try to unregister already registered device diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs index 6b883bab..e954e7f8 100644 --- a/src/api/core/ciphers.rs +++ b/src/api/core/ciphers.rs @@ -381,7 +381,7 @@ pub async fn update_cipher_from_data( if let Some(dt) = data.last_known_revision_date { match NaiveDateTime::parse_from_str(&dt, "%+") { // ISO 8601 format - Err(err) => warn!("Error parsing LastKnownRevisionDate '{}': {}", dt, err), + Err(err) => warn!("Error parsing LastKnownRevisionDate '{dt}': {err}"), Ok(dt) if cipher.updated_at.signed_duration_since(dt).num_seconds() > 1 => { err!("The client copy of this cipher is out of date. Resync the client and try again.") } @@ -1105,7 +1105,7 @@ async fn post_attachment_v2( Attachment::new(attachment_id.clone(), cipher.uuid.clone(), data.file_name, file_size, Some(data.key)); attachment.save(&mut conn).await.expect("Error saving attachment"); - let url = format!("/ciphers/{}/attachment/{}", cipher.uuid, attachment_id); + let url = format!("/ciphers/{}/attachment/{attachment_id}", cipher.uuid); let response_key = match data.admin_request { Some(b) if b => "cipherMiniResponse", _ => "cipherResponse", diff --git a/src/api/core/emergency_access.rs b/src/api/core/emergency_access.rs index 8c6fcb65..9d5ed7aa 100644 --- a/src/api/core/emergency_access.rs +++ b/src/api/core/emergency_access.rs @@ -227,7 +227,7 @@ async fn send_invite(data: Json, headers: Headers, mu let (grantee_user, new_user) = match User::find_by_mail(&email, &mut conn).await { None => { if !CONFIG.invitations_allowed() { - err!(format!("Grantee user does not exist: {}", &email)) + err!(format!("Grantee user does not exist: {email}")) } if !CONFIG.is_email_domain_allowed(&email) { diff --git a/src/api/core/sends.rs b/src/api/core/sends.rs index bf7a5ec8..01bce86f 100644 --- a/src/api/core/sends.rs +++ b/src/api/core/sends.rs @@ -338,7 +338,7 @@ async fn post_send_file_v2(data: Json, headers: Headers, mut conn: DbC Ok(Json(json!({ "fileUploadType": 0, // 0 == Direct | 1 == Azure "object": "send-fileUpload", - "url": format!("/sends/{}/file/{}", send.uuid, file_id), + "url": format!("/sends/{}/file/{file_id}", send.uuid), "sendResponse": send.to_json() }))) } @@ -556,7 +556,7 @@ async fn post_access_file( Ok(Json(json!({ "object": "send-fileDownload", "id": file_id, - "url": format!("{}/api/sends/{}/{}?t={}", &host.host, send_id, file_id, token) + "url": format!("{}/api/sends/{send_id}/{file_id}?t={token}", &host.host) }))) } diff --git a/src/api/core/two_factor/authenticator.rs b/src/api/core/two_factor/authenticator.rs index 3386f7d7..3bdb1226 100644 --- a/src/api/core/two_factor/authenticator.rs +++ b/src/api/core/two_factor/authenticator.rs @@ -148,7 +148,7 @@ pub async fn validate_totp_code( if generated == totp_code && time_step > twofactor.last_used { // If the step does not equals 0 the time is drifted either server or client side. if step != 0 { - warn!("TOTP Time drift detected. The step offset is {}", step); + warn!("TOTP Time drift detected. The step offset is {step}"); } // Save the last used time step so only totp time steps higher then this one are allowed. @@ -157,7 +157,7 @@ pub async fn validate_totp_code( twofactor.save(conn).await?; return Ok(()); } else if generated == totp_code && time_step <= twofactor.last_used { - warn!("This TOTP or a TOTP code within {} steps back or forward has already been used!", steps); + warn!("This TOTP or a TOTP code within {steps} steps back or forward has already been used!"); err!( format!("Invalid TOTP code! Server time: {} IP: {}", current_time.format("%F %T UTC"), ip.ip), ErrorEvent { diff --git a/src/api/core/two_factor/duo.rs b/src/api/core/two_factor/duo.rs index aa281ae7..7f7d42ba 100644 --- a/src/api/core/two_factor/duo.rs +++ b/src/api/core/two_factor/duo.rs @@ -202,7 +202,7 @@ async fn duo_api_request(method: &str, path: &str, params: &str, data: &DuoData) use std::str::FromStr; // https://duo.com/docs/authapi#api-details - let url = format!("https://{}{}", &data.host, path); + let url = format!("https://{}{path}", &data.host); let date = Utc::now().to_rfc2822(); let username = &data.ik; let fields = [&date, method, &data.host, path, params]; @@ -274,9 +274,9 @@ pub async fn generate_duo_signature(email: &str, conn: &mut DbConn) -> ApiResult fn sign_duo_values(key: &str, email: &str, ikey: &str, prefix: &str, expire: i64) -> String { let val = format!("{email}|{ikey}|{expire}"); - let cookie = format!("{}|{}", prefix, BASE64.encode(val.as_bytes())); + let cookie = format!("{prefix}|{}", BASE64.encode(val.as_bytes())); - format!("{}|{}", cookie, crypto::hmac_sign(key, &cookie)) + format!("{cookie}|{}", crypto::hmac_sign(key, &cookie)) } pub async fn validate_duo_login(email: &str, response: &str, conn: &mut DbConn) -> EmptyResult { diff --git a/src/api/core/two_factor/duo_oidc.rs b/src/api/core/two_factor/duo_oidc.rs index e90d229f..e554b1d6 100644 --- a/src/api/core/two_factor/duo_oidc.rs +++ b/src/api/core/two_factor/duo_oidc.rs @@ -182,7 +182,7 @@ impl DuoClient { HealthCheckResponse::HealthFail { message, message_detail, - } => err!(format!("Duo health check FAIL response, msg: {}, detail: {}", message, message_detail)), + } => err!(format!("Duo health check FAIL response, msg: {message}, detail: {message_detail}")), }; if health_stat != "OK" { @@ -275,7 +275,7 @@ impl DuoClient { let status_code = res.status(); if status_code != StatusCode::OK { - err!(format!("Failure response from Duo: {}", status_code)) + err!(format!("Failure response from Duo: {status_code}")) } let response: IdTokenResponse = match res.json::().await { @@ -478,7 +478,7 @@ pub async fn validate_duo_login( Err(e) => return Err(e), }; - let d: Digest = digest(&SHA512_256, format!("{}{}", ctx.nonce, device_identifier).as_bytes()); + let d: Digest = digest(&SHA512_256, format!("{}{device_identifier}", ctx.nonce).as_bytes()); let hash: String = HEXLOWER.encode(d.as_ref()); match client.exchange_authz_code_for_result(code, email, hash.as_str()).await { diff --git a/src/api/core/two_factor/email.rs b/src/api/core/two_factor/email.rs index 26cc5945..110856ab 100644 --- a/src/api/core/two_factor/email.rs +++ b/src/api/core/two_factor/email.rs @@ -210,7 +210,7 @@ pub async fn validate_email_code_str( .map_res("Two factor not found")?; let Some(issued_token) = &email_data.last_token else { err!( - format!("No token available! IP: {}", ip), + format!("No token available! IP: {ip}"), ErrorEvent { event: EventType::UserFailedLogIn2fa } @@ -226,7 +226,7 @@ pub async fn validate_email_code_str( twofactor.save(conn).await?; err!( - format!("Token is invalid! IP: {}", ip), + format!("Token is invalid! IP: {ip}"), ErrorEvent { event: EventType::UserFailedLogIn2fa } @@ -329,7 +329,7 @@ pub fn obscure_email(email: &str) -> String { } }; - format!("{}@{}", new_name, &domain) + format!("{new_name}@{domain}") } pub async fn find_and_activate_email_2fa(user_id: &UserId, conn: &mut DbConn) -> EmptyResult { diff --git a/src/api/icons.rs b/src/api/icons.rs index 0b437d53..3cccb351 100644 --- a/src/api/icons.rs +++ b/src/api/icons.rs @@ -69,12 +69,12 @@ static ICON_SIZE_REGEX: Lazy = Lazy::new(|| Regex::new(r"(?x)(\d+)\D*(\d+ #[get("//icon.png")] fn icon_external(domain: &str) -> Option { if !is_valid_domain(domain) { - warn!("Invalid domain: {}", domain); + warn!("Invalid domain: {domain}"); return None; } if should_block_address(domain) { - warn!("Blocked address: {}", domain); + warn!("Blocked address: {domain}"); return None; } @@ -96,7 +96,7 @@ async fn icon_internal(domain: &str) -> Cached<(ContentType, Vec)> { const FALLBACK_ICON: &[u8] = include_bytes!("../static/images/fallback-icon.png"); if !is_valid_domain(domain) { - warn!("Invalid domain: {}", domain); + warn!("Invalid domain: {domain}"); return Cached::ttl( (ContentType::new("image", "png"), FALLBACK_ICON.to_vec()), CONFIG.icon_cache_negttl(), @@ -105,7 +105,7 @@ async fn icon_internal(domain: &str) -> Cached<(ContentType, Vec)> { } if should_block_address(domain) { - warn!("Blocked address: {}", domain); + warn!("Blocked address: {domain}"); return Cached::ttl( (ContentType::new("image", "png"), FALLBACK_ICON.to_vec()), CONFIG.icon_cache_negttl(), @@ -130,7 +130,7 @@ fn is_valid_domain(domain: &str) -> bool { // If parsing the domain fails using Url, it will not work with reqwest. if let Err(parse_error) = url::Url::parse(format!("https://{domain}").as_str()) { - debug!("Domain parse error: '{}' - {:?}", domain, parse_error); + debug!("Domain parse error: '{domain}' - {parse_error:?}"); return false; } else if domain.is_empty() || domain.contains("..") @@ -139,18 +139,17 @@ fn is_valid_domain(domain: &str) -> bool { || domain.ends_with('-') { debug!( - "Domain validation error: '{}' is either empty, contains '..', starts with an '.', starts or ends with a '-'", - domain + "Domain validation error: '{domain}' is either empty, contains '..', starts with an '.', starts or ends with a '-'" ); return false; } else if domain.len() > 255 { - debug!("Domain validation error: '{}' exceeds 255 characters", domain); + debug!("Domain validation error: '{domain}' exceeds 255 characters"); return false; } for c in domain.chars() { if !c.is_alphanumeric() && !ALLOWED_CHARS.contains(c) { - debug!("Domain validation error: '{}' contains an invalid character '{}'", domain, c); + debug!("Domain validation error: '{domain}' contains an invalid character '{c}'"); return false; } } @@ -159,7 +158,7 @@ fn is_valid_domain(domain: &str) -> bool { } async fn get_icon(domain: &str) -> Option<(Vec, String)> { - let path = format!("{}/{}.png", CONFIG.icon_cache_folder(), domain); + let path = format!("{}/{domain}.png", CONFIG.icon_cache_folder()); // Check for expiration of negatively cached copy if icon_is_negcached(&path).await { @@ -167,10 +166,7 @@ async fn get_icon(domain: &str) -> Option<(Vec, String)> { } if let Some(icon) = get_cached_icon(&path).await { - let icon_type = match get_icon_type(&icon) { - Some(x) => x, - _ => "x-icon", - }; + let icon_type = get_icon_type(&icon).unwrap_or("x-icon"); return Some((icon, icon_type.to_string())); } @@ -192,7 +188,7 @@ async fn get_icon(domain: &str) -> Option<(Vec, String)> { return None; } - warn!("Unable to download icon: {:?}", e); + warn!("Unable to download icon: {e:?}"); let miss_indicator = path + ".miss"; save_icon(&miss_indicator, &[]).await; None @@ -234,7 +230,7 @@ async fn icon_is_negcached(path: &str) -> bool { // No longer negatively cached, drop the marker Ok(true) => { if let Err(e) = remove_file(&miss_indicator).await { - error!("Could not remove negative cache indicator for icon {:?}: {:?}", path, e); + error!("Could not remove negative cache indicator for icon {path:?}: {e:?}"); } false } @@ -534,10 +530,10 @@ async fn download_icon(domain: &str) -> Result<(Bytes, Option<&str>), Error> { // Check if the icon type is allowed, else try an icon from the list. icon_type = get_icon_type(&body); if icon_type.is_none() { - debug!("Icon from {} data:image uri, is not a valid image type", domain); + debug!("Icon from {domain} data:image uri, is not a valid image type"); continue; } - info!("Extracted icon from data:image uri for {}", domain); + info!("Extracted icon from data:image uri for {domain}"); buffer = body.freeze(); break; } @@ -577,7 +573,7 @@ async fn save_icon(path: &str, icon: &[u8]) { create_dir_all(&CONFIG.icon_cache_folder()).await.expect("Error creating icon cache folder"); } Err(e) => { - warn!("Unable to save icon: {:?}", e); + warn!("Unable to save icon: {e:?}"); } } } diff --git a/src/api/identity.rs b/src/api/identity.rs index cdcfbbcc..59e585f0 100644 --- a/src/api/identity.rs +++ b/src/api/identity.rs @@ -158,7 +158,7 @@ async fn _password_login( // Get the user let username = data.username.as_ref().unwrap().trim(); let Some(mut user) = User::find_by_mail(username, conn).await else { - err!("Username or password is incorrect. Try again", format!("IP: {}. Username: {}.", ip.ip, username)) + err!("Username or password is incorrect. Try again", format!("IP: {}. Username: {username}.", ip.ip)) }; // Set the user_id here to be passed back used for event logging. @@ -168,7 +168,7 @@ async fn _password_login( if !user.enabled { err!( "This user has been disabled", - format!("IP: {}. Username: {}.", ip.ip, username), + format!("IP: {}. Username: {username}.", ip.ip), ErrorEvent { event: EventType::UserFailedLogIn } @@ -182,7 +182,7 @@ async fn _password_login( let Some(auth_request) = AuthRequest::find_by_uuid_and_user(auth_request_id, &user.uuid, conn).await else { err!( "Auth request not found. Try again.", - format!("IP: {}. Username: {}.", ip.ip, username), + format!("IP: {}. Username: {username}.", ip.ip), ErrorEvent { event: EventType::UserFailedLogIn, } @@ -200,7 +200,7 @@ async fn _password_login( { err!( "Username or access code is incorrect. Try again", - format!("IP: {}. Username: {}.", ip.ip, username), + format!("IP: {}. Username: {username}.", ip.ip), ErrorEvent { event: EventType::UserFailedLogIn, } @@ -209,7 +209,7 @@ async fn _password_login( } else if !user.check_valid_password(password) { err!( "Username or password is incorrect. Try again", - format!("IP: {}. Username: {}.", ip.ip, username), + format!("IP: {}. Username: {username}.", ip.ip), ErrorEvent { event: EventType::UserFailedLogIn, } @@ -222,7 +222,7 @@ async fn _password_login( user.set_password(password, None, false, None); if let Err(e) = user.save(conn).await { - error!("Error updating user: {:#?}", e); + error!("Error updating user: {e:#?}"); } } @@ -241,11 +241,11 @@ async fn _password_login( user.login_verify_count += 1; if let Err(e) = user.save(conn).await { - error!("Error updating user: {:#?}", e); + error!("Error updating user: {e:#?}"); } if let Err(e) = mail::send_verify_email(&user.email, &user.uuid).await { - error!("Error auto-sending email verification email: {:#?}", e); + error!("Error auto-sending email verification email: {e:#?}"); } } } @@ -253,7 +253,7 @@ async fn _password_login( // We still want the login to fail until they actually verified the email address err!( "Please verify your email before trying again.", - format!("IP: {}. Username: {}.", ip.ip, username), + format!("IP: {}. Username: {username}.", ip.ip), ErrorEvent { event: EventType::UserFailedLogIn } @@ -266,7 +266,7 @@ async fn _password_login( if CONFIG.mail_enabled() && new_device { if let Err(e) = mail::send_new_device_logged_in(&user.email, &ip.ip.to_string(), &now, &device).await { - error!("Error sending new device email: {:#?}", e); + error!("Error sending new device email: {e:#?}"); if CONFIG.require_device_email() { err!( @@ -352,7 +352,7 @@ async fn _password_login( result["TwoFactorToken"] = Value::String(token); } - info!("User {} logged in successfully. IP: {}", username, ip.ip); + info!("User {username} logged in successfully. IP: {}", ip.ip); Ok(Json(result)) } @@ -420,7 +420,7 @@ async fn _user_api_key_login( if CONFIG.mail_enabled() && new_device { let now = Utc::now().naive_utc(); if let Err(e) = mail::send_new_device_logged_in(&user.email, &ip.ip.to_string(), &now, &device).await { - error!("Error sending new device email: {:#?}", e); + error!("Error sending new device email: {e:#?}"); if CONFIG.require_device_email() { err!( diff --git a/src/api/push.rs b/src/api/push.rs index e3ea0bcb..d97ef7b4 100644 --- a/src/api/push.rs +++ b/src/api/push.rs @@ -257,7 +257,7 @@ async fn send_to_push_relay(notification_data: Value) { let auth_push_token = match get_auth_push_token().await { Ok(s) => s, Err(e) => { - debug!("Could not get the auth push token: {}", e); + debug!("Could not get the auth push token: {e}"); return; } }; @@ -267,7 +267,7 @@ async fn send_to_push_relay(notification_data: Value) { let req = match make_http_request(Method::POST, &(CONFIG.push_relay_uri() + "/push/send")) { Ok(r) => r, Err(e) => { - error!("An error occurred while sending a send update to the push relay: {}", e); + error!("An error occurred while sending a send update to the push relay: {e}"); return; } }; @@ -280,7 +280,7 @@ async fn send_to_push_relay(notification_data: Value) { .send() .await { - error!("An error occurred while sending a send update to the push relay: {}", e); + error!("An error occurred while sending a send update to the push relay: {e}"); }; } diff --git a/src/auth.rs b/src/auth.rs index 0fabd6a4..939324d8 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -289,7 +289,7 @@ pub fn generate_organization_api_key_login_claims( exp: (time_now + TimeDelta::try_hours(1).unwrap()).timestamp(), iss: JWT_ORG_API_KEY_ISSUER.to_string(), sub: org_api_key_uuid, - client_id: format!("organization.{}", org_id), + client_id: format!("organization.{org_id}"), client_sub: org_id, scope: vec!["api.organization".into()], } @@ -547,7 +547,7 @@ impl<'r> FromRequest<'r> for Headers { let mut user = user; user.reset_stamp_exception(); if let Err(e) = user.save(&mut conn).await { - error!("Error updating user: {:#?}", e); + error!("Error updating user: {e:#?}"); } err_handler!("Stamp exception is expired") } else if !stamp_exception.routes.contains(¤t_route.to_string()) { @@ -911,7 +911,7 @@ impl<'r> FromRequest<'r> for ClientIp { None => ip, } .parse() - .map_err(|_| warn!("'{}' header is malformed: {}", CONFIG.ip_header(), ip)) + .map_err(|_| warn!("'{}' header is malformed: {ip}", CONFIG.ip_header())) .ok() }) } else { diff --git a/src/config.rs b/src/config.rs index 790443f0..0eddfb66 100644 --- a/src/config.rs +++ b/src/config.rs @@ -375,19 +375,19 @@ make_config! { /// Data folder |> Main data folder data_folder: String, false, def, "data".to_string(); /// Database URL - database_url: String, false, auto, |c| format!("{}/{}", c.data_folder, "db.sqlite3"); + database_url: String, false, auto, |c| format!("{}/db.sqlite3", c.data_folder); /// Icon cache folder - icon_cache_folder: String, false, auto, |c| format!("{}/{}", c.data_folder, "icon_cache"); + icon_cache_folder: String, false, auto, |c| format!("{}/icon_cache", c.data_folder); /// Attachments folder - attachments_folder: String, false, auto, |c| format!("{}/{}", c.data_folder, "attachments"); + attachments_folder: String, false, auto, |c| format!("{}/attachments", c.data_folder); /// Sends folder - sends_folder: String, false, auto, |c| format!("{}/{}", c.data_folder, "sends"); + sends_folder: String, false, auto, |c| format!("{}/sends", c.data_folder); /// Temp folder |> Used for storing temporary file uploads - tmp_folder: String, false, auto, |c| format!("{}/{}", c.data_folder, "tmp"); + tmp_folder: String, false, auto, |c| format!("{}/tmp", c.data_folder); /// Templates folder - templates_folder: String, false, auto, |c| format!("{}/{}", c.data_folder, "templates"); + templates_folder: String, false, auto, |c| format!("{}/templates", c.data_folder); /// Session JWT key - rsa_key_filename: String, false, auto, |c| format!("{}/{}", c.data_folder, "rsa_key"); + rsa_key_filename: String, false, auto, |c| format!("{}/rsa_key", c.data_folder); /// Web vault folder web_vault_folder: String, false, def, "web-vault/".to_string(); }, @@ -1215,7 +1215,7 @@ impl Config { pub fn is_email_domain_allowed(&self, email: &str) -> bool { let e: Vec<&str> = email.rsplitn(2, '@').collect(); if e.len() != 2 || e[0].is_empty() || e[1].is_empty() { - warn!("Failed to parse email address '{}'", email); + warn!("Failed to parse email address '{email}'"); return false; } let email_domain = e[0].to_lowercase(); diff --git a/src/db/models/attachment.rs b/src/db/models/attachment.rs index 09348f78..e8da38a5 100644 --- a/src/db/models/attachment.rs +++ b/src/db/models/attachment.rs @@ -46,7 +46,7 @@ impl Attachment { pub fn get_url(&self, host: &str) -> String { let token = encode_jwt(&generate_file_download_claims(self.cipher_uuid.clone(), self.id.clone())); - format!("{}/attachments/{}/{}?token={}", host, self.cipher_uuid, self.id, token) + format!("{host}/attachments/{}/{}?token={token}", self.cipher_uuid, self.id) } pub fn to_json(&self, host: &str) -> Value { @@ -117,7 +117,7 @@ impl Attachment { // upstream caller has already cleaned up the file as part of // its own error handling. Err(e) if e.kind() == ErrorKind::NotFound => { - debug!("File '{}' already deleted.", file_path); + debug!("File '{file_path}' already deleted."); Ok(()) } Err(e) => Err(e.into()), diff --git a/src/db/models/cipher.rs b/src/db/models/cipher.rs index d9dbd28d..089aaaf4 100644 --- a/src/db/models/cipher.rs +++ b/src/db/models/cipher.rs @@ -85,7 +85,7 @@ impl Cipher { let mut validation_errors = serde_json::Map::new(); let max_note_size = CONFIG._max_note_size(); let max_note_size_msg = - format!("The field Notes exceeds the maximum encrypted value length of {} characters.", &max_note_size); + format!("The field Notes exceeds the maximum encrypted value length of {max_note_size} characters."); for (index, cipher) in cipher_data.iter().enumerate() { // Validate the note size and if it is exceeded return a warning if let Some(note) = &cipher.notes { diff --git a/src/db/models/group.rs b/src/db/models/group.rs index a6f66b71..ebb4c31b 100644 --- a/src/db/models/group.rs +++ b/src/db/models/group.rs @@ -298,7 +298,7 @@ impl Group { pub async fn update_revision(uuid: &GroupId, conn: &mut DbConn) { if let Err(e) = Self::_update_revision(uuid, &Utc::now().naive_utc(), conn).await { - warn!("Failed to update revision for {}: {:#?}", uuid, e); + warn!("Failed to update revision for {uuid}: {e:#?}"); } } diff --git a/src/db/models/user.rs b/src/db/models/user.rs index 012bb10c..3c0c7857 100644 --- a/src/db/models/user.rs +++ b/src/db/models/user.rs @@ -334,7 +334,7 @@ impl User { pub async fn update_uuid_revision(uuid: &UserId, conn: &mut DbConn) { if let Err(e) = Self::_update_revision(uuid, &Utc::now().naive_utc(), conn).await { - warn!("Failed to update revision for {}: {:#?}", uuid, e); + warn!("Failed to update revision for {uuid}: {e:#?}"); } } diff --git a/src/error.rs b/src/error.rs index 1061a08d..754bece3 100644 --- a/src/error.rs +++ b/src/error.rs @@ -214,7 +214,7 @@ impl Responder<'_, 'static> for Error { match self.error { ErrorKind::Empty(_) => {} // Don't print the error in this situation ErrorKind::Simple(_) => {} // Don't print the error in this situation - _ => error!(target: "error", "{:#?}", self), + _ => error!(target: "error", "{self:#?}"), }; let code = Status::from_code(self.error_code).unwrap_or(Status::BadRequest); diff --git a/src/mail.rs b/src/mail.rs index 015d8acb..8100815e 100644 --- a/src/mail.rs +++ b/src/mail.rs @@ -85,7 +85,7 @@ fn smtp_transport() -> AsyncSmtpTransport { smtp_client.authentication(selected_mechanisms) } else { // Only show a warning, and return without setting an actual authentication mechanism - warn!("No valid SMTP Auth mechanism found for '{}', using default values", mechanism); + warn!("No valid SMTP Auth mechanism found for '{mechanism}', using default values"); smtp_client } } @@ -213,7 +213,7 @@ pub async fn send_register_verify_email(email: &str, token: &str) -> EmptyResult "email/register_verify_email", json!({ // `url.Url` would place the anchor `#` after the query parameters - "url": format!("{}/#/finish-signup/?{}", CONFIG.domain(), query_string), + "url": format!("{}/#/finish-signup/?{query_string}", CONFIG.domain()), "img_src": CONFIG._smtp_img_src(), "email": email, }), @@ -314,7 +314,7 @@ pub async fn send_invite( "email/send_org_invite", json!({ // `url.Url` would place the anchor `#` after the query parameters - "url": format!("{}/#/accept-organization/?{}", CONFIG.domain(), query_string), + "url": format!("{}/#/accept-organization/?{query_string}", CONFIG.domain()), "img_src": CONFIG._smtp_img_src(), "org_name": org_name, }), @@ -615,13 +615,13 @@ async fn send_with_selected_transport(email: Message) -> EmptyResult { // Match some common errors and make them more user friendly Err(e) => { if e.is_client() { - debug!("Sendmail client error: {:?}", e); + debug!("Sendmail client error: {e:?}"); err!(format!("Sendmail client error: {e}")); } else if e.is_response() { - debug!("Sendmail response error: {:?}", e); + debug!("Sendmail response error: {e:?}"); err!(format!("Sendmail response error: {e}")); } else { - debug!("Sendmail error: {:?}", e); + debug!("Sendmail error: {e:?}"); err!(format!("Sendmail error: {e}")); } } @@ -632,13 +632,13 @@ async fn send_with_selected_transport(email: Message) -> EmptyResult { // Match some common errors and make them more user friendly Err(e) => { if e.is_client() { - debug!("SMTP client error: {:#?}", e); + debug!("SMTP client error: {e:#?}"); err!(format!("SMTP client error: {e}")); } else if e.is_transient() { - debug!("SMTP 4xx error: {:#?}", e); + debug!("SMTP 4xx error: {e:#?}"); err!(format!("SMTP 4xx error: {e}")); } else if e.is_permanent() { - debug!("SMTP 5xx error: {:#?}", e); + debug!("SMTP 5xx error: {e:#?}"); let mut msg = e.to_string(); // Add a special check for 535 to add a more descriptive message if msg.contains("(535)") { @@ -646,13 +646,13 @@ async fn send_with_selected_transport(email: Message) -> EmptyResult { } err!(format!("SMTP 5xx error: {msg}")); } else if e.is_timeout() { - debug!("SMTP timeout error: {:#?}", e); + debug!("SMTP timeout error: {e:#?}"); err!(format!("SMTP timeout error: {e}")); } else if e.is_tls() { - debug!("SMTP encryption error: {:#?}", e); + debug!("SMTP encryption error: {e:#?}"); err!(format!("SMTP encryption error: {e}")); } else { - debug!("SMTP error: {:#?}", e); + debug!("SMTP error: {e:#?}"); err!(format!("SMTP error: {e}")); } } diff --git a/src/main.rs b/src/main.rs index 530c7b2c..ccb64914 100644 --- a/src/main.rs +++ b/src/main.rs @@ -430,10 +430,7 @@ fn init_logging() -> Result { } None => error!( target: "panic", - "thread '{}' panicked at '{}'\n{:}", - thread, - msg, - backtrace + "thread '{thread}' panicked at '{msg}'\n{backtrace:}" ), } })); @@ -453,7 +450,7 @@ fn chain_syslog(logger: fern::Dispatch) -> fern::Dispatch { match syslog::unix(syslog_fmt) { Ok(sl) => logger.chain(sl), Err(e) => { - error!("Unable to connect to syslog: {:?}", e); + error!("Unable to connect to syslog: {e:?}"); logger } } @@ -469,7 +466,7 @@ async fn check_data_folder() { let data_folder = &CONFIG.data_folder(); let path = Path::new(data_folder); if !path.exists() { - error!("Data folder '{}' doesn't exist.", data_folder); + error!("Data folder '{data_folder}' doesn't exist."); if is_running_in_container() { error!("Verify that your data volume is mounted at the correct location."); } else { @@ -478,7 +475,7 @@ async fn check_data_folder() { exit(1); } if !path.is_dir() { - error!("Data folder '{}' is not a directory.", data_folder); + error!("Data folder '{data_folder}' is not a directory."); exit(1); } @@ -552,7 +549,7 @@ async fn create_db_pool() -> db::DbPool { match util::retry_db(db::DbPool::from_config, CONFIG.db_connection_retries()).await { Ok(p) => p, Err(e) => { - error!("Error creating database pool: {:?}", e); + error!("Error creating database pool: {e:?}"); exit(1); } } diff --git a/src/static/templates/scss/vaultwarden.scss.hbs b/src/static/templates/scss/vaultwarden.scss.hbs index 1050f358..45b4138c 100644 --- a/src/static/templates/scss/vaultwarden.scss.hbs +++ b/src/static/templates/scss/vaultwarden.scss.hbs @@ -61,7 +61,7 @@ app-organization-plans > form > bit-section:nth-child(2) { } /* Hide Collection Management Form */ -app-org-account form.ng-untouched:nth-child(6) { +app-org-account form.ng-untouched:nth-child(5) { @extend %vw-hide; } diff --git a/src/util.rs b/src/util.rs index 1f8d1c27..c72f23ce 100644 --- a/src/util.rs +++ b/src/util.rs @@ -268,8 +268,8 @@ impl Fairing for BetterLogging { } else { "http" }; - let addr = format!("{}://{}:{}", &scheme, &config.address, &config.port); - info!(target: "start", "Rocket has launched from {}", addr); + let addr = format!("{scheme}://{}:{}", &config.address, &config.port); + info!(target: "start", "Rocket has launched from {addr}"); } async fn on_request(&self, request: &mut Request<'_>, _data: &mut Data<'_>) { @@ -283,8 +283,8 @@ impl Fairing for BetterLogging { let uri_subpath = uri_path_str.strip_prefix(&CONFIG.domain_path()).unwrap_or(&uri_path_str); if self.0 || LOGGED_ROUTES.iter().any(|r| uri_subpath.starts_with(r)) { match uri.query() { - Some(q) => info!(target: "request", "{} {}?{}", method, uri_path_str, &q[..q.len().min(30)]), - None => info!(target: "request", "{} {}", method, uri_path_str), + Some(q) => info!(target: "request", "{method} {uri_path_str}?{}", &q[..q.len().min(30)]), + None => info!(target: "request", "{method} {uri_path_str}"), }; } } @@ -299,9 +299,9 @@ impl Fairing for BetterLogging { if self.0 || LOGGED_ROUTES.iter().any(|r| uri_subpath.starts_with(r)) { let status = response.status(); if let Some(ref route) = request.route() { - info!(target: "response", "{} => {}", route, status) + info!(target: "response", "{route} => {status}") } else { - info!(target: "response", "{}", status) + info!(target: "response", "{status}") } } } @@ -326,7 +326,7 @@ pub fn get_display_size(size: i64) -> String { } } - format!("{:.2} {}", size, UNITS[unit_counter]) + format!("{size:.2} {}", UNITS[unit_counter]) } pub fn get_uuid() -> String { @@ -699,7 +699,7 @@ where return Err(e); } - warn!("Can't connect to database, retrying: {:?}", e); + warn!("Can't connect to database, retrying: {e:?}"); sleep(Duration::from_millis(1_000)).await; }