From 92e9bf14f3108db3b9b7ea38d72c5dfc79e90c4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Fri, 14 Aug 2026 07:02:36 +0000 Subject: [PATCH 01/15] chore(deps): update semver-compatible dependencies Refresh Cargo.lock to the latest semver-compatible releases and raise the pinned minimums for chrono, uuid, rustls and once_cell. The htpasswd snapshot is updated because toml 0.8.23 no longer emits a blank line between serialized tables. --- Cargo.lock | 1178 +++++++++-------- Cargo.toml | 8 +- ...rver__htpasswd__test__htpasswd_passes.snap | 1 - 3 files changed, 639 insertions(+), 548 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9c3d235..ce100ad 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "abscissa_core" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de5df09bc18cb069dec8524aff811cbe9d7bf5f4b78ef739ef125a37b9d3f044" +checksum = "3083187ad864402d6bde86c5b51767b921edf4d02bf03b8ba40172dbd2a9773b" dependencies = [ "abscissa_derive", "arc-swap", @@ -14,14 +14,14 @@ dependencies = [ "canonical-path", "clap", "color-eyre", - "fs-err", + "fs-err 2.11.0", "once_cell", "regex", "secrecy", "semver", "serde", "termcolor", - "toml 0.8.19", + "toml", "tracing", "tracing-log", "tracing-subscriber", @@ -30,9 +30,9 @@ dependencies = [ [[package]] name = "abscissa_derive" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e04c7df69b2c6b9b6dba8422d1295e58ac4bcfc7c9e7e7d4c55a38aaff2ad92a" +checksum = "08d914621d2ef4da433fe01907e323ee3f2807738d392d5a34c287b381f87fe2" dependencies = [ "ident_case", "proc-macro2", @@ -53,48 +53,42 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" dependencies = [ "memchr", ] -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" dependencies = [ "libc", ] [[package]] name = "anstream" -version = "0.6.18" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" dependencies = [ "anstyle", "anstyle-parse", @@ -107,59 +101,62 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.10" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "anstyle-parse" -version = "0.2.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.2" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.6" +version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", - "windows-sys 0.59.0", + "once_cell_polyfill", + "windows-sys 0.61.2", ] [[package]] name = "anyhow" -version = "1.0.93" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" [[package]] name = "arc-swap" -version = "1.7.1" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" +checksum = "c049c0be4daef0b145cb3555416b3b8ef5b7888a38aea1a3a155801fe7b0810b" +dependencies = [ + "rustversion", +] [[package]] name = "assert_cmd" -version = "2.0.16" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1835b7f27878de8525dc71410b5a31cdcc5f230aed5ba5df968e09c201b23d" +checksum = "2aa3a22042e45de04255c7bf3626e239f450200fd0493c1e382263544b20aea6" dependencies = [ "anstyle", "bstr", - "doc-comment", "libc", "predicates", "predicates-core", @@ -169,13 +166,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.83" +version = "0.1.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 3.0.3", ] [[package]] @@ -186,9 +183,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.4.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "axum" @@ -218,9 +215,9 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", - "tower 0.5.1", + "tower", "tower-layer", "tower-service", "tracing", @@ -253,7 +250,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 1.0.2", + "sync_wrapper", "tower-layer", "tower-service", "tracing", @@ -285,7 +282,7 @@ dependencies = [ "serde_json", "tokio", "tokio-util", - "tower 0.5.1", + "tower", "tower-layer", "tower-service", "typed-json", @@ -299,7 +296,7 @@ checksum = "57d123550fa8d071b7255cb0cc04dc302baa6c8c4a79f55701552684d8399bce" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.119", ] [[package]] @@ -319,16 +316,15 @@ dependencies = [ [[package]] name = "axum-server" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56bac90848f6a9393ac03c63c640925c4b7c8ca21654de40d53f55964667c7d8" +checksum = "c1ab4a3ec9ea8a657c72d99a03a824af695bd0fb5ec639ccbd9cd3543b41a5f9" dependencies = [ "arc-swap", "bytes", - "futures-util", + "fs-err 3.3.1", "http", "http-body", - "http-body-util", "hyper", "hyper-util", "pin-project-lite", @@ -337,23 +333,22 @@ dependencies = [ "rustls-pki-types", "tokio", "tokio-rustls", - "tower 0.4.13", "tower-service", ] [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-link", ] [[package]] @@ -382,7 +377,7 @@ checksum = "a7e7c93a3fb23b2fdde989b2c9ec4dd153063ec81f408507f84c090cd91c6641" dependencies = [ "base64 0.13.1", "blowfish 0.9.1", - "getrandom", + "getrandom 0.2.17", "zeroize", ] @@ -394,9 +389,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" [[package]] name = "block-buffer" @@ -439,20 +434,20 @@ dependencies = [ [[package]] name = "bstr" -version = "1.11.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a68f1f47cdf0ec8ee4b941b2eee2a80cb796db73118c0dd09ac63fbe405be22" +checksum = "6bb31b46c14244e20ee9984b11bf5c992b91fb6939fea616e3512c8baecdbe5f" dependencies = [ "memchr", - "regex-automata 0.4.9", - "serde", + "regex-automata", + "serde_core", ] [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" [[package]] name = "byteorder" @@ -462,9 +457,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.9.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" [[package]] name = "canonical-path" @@ -474,32 +469,32 @@ checksum = "e6e9e01327e6c86e92ec72b1c798d4a94810f147209bbe3ffab6a86954937a6f" [[package]] name = "cc" -version = "1.2.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" +checksum = "5d262e149917187838d5b42777c8253bcb64500067342904e7d429499a6f277e" dependencies = [ + "find-msvc-tools", "shlex", ] [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" dependencies = [ - "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.6", + "windows-link", ] [[package]] @@ -523,9 +518,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.21" +version = "4.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" +checksum = "473c7e07f409a8d772161724aa8db6a765a2532a70f9667eeb7b49d3d02fbdca" dependencies = [ "clap_builder", "clap_derive", @@ -533,9 +528,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.21" +version = "4.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" +checksum = "7b48fea5a88e9ae728a2dcbedbfc0e730f7d60da42e1cb049a83c9fb8b789889" dependencies = [ "anstream", "anstyle", @@ -546,27 +541,27 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.18" +version = "4.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" +checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.90", + "syn 3.0.3", ] [[package]] name = "clap_lex" -version = "0.7.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" [[package]] name = "color-eyre" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55146f5e46f237f7423d74111267d4597b59b0dad0ffaf7303bce9945d843ad5" +checksum = "e5920befb47832a6d61ee3a3a846565cfa39b331331e68a3b1d1116630f2f26d" dependencies = [ "backtrace", "eyre", @@ -577,9 +572,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" [[package]] name = "conflate" @@ -600,19 +595,18 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.119", ] [[package]] name = "console" -version = "0.15.8" +version = "0.16.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +checksum = "4fe5f465a4f6fee88fad41b85d990f84c835335e85b5d9e6e63e0d06d28cba7c" dependencies = [ "encode_unicode", - "lazy_static", "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -623,9 +617,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] @@ -657,9 +651,9 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ "generic-array", "typenum", @@ -713,39 +707,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3ca7fa3ba397980657070e679f412acddb7a372f1793ff68ef0bbe708680f0f" dependencies = [ "regex", - "sha2 0.10.8", + "sha2 0.10.9", "thiserror 1.0.69", "walkdir", ] [[package]] name = "displaydoc" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 3.0.3", ] -[[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - [[package]] name = "dyn-clone" -version = "1.0.17" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "encode_unicode" -version = "0.3.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] name = "encoding_rs" @@ -758,41 +746,48 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.10" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "eyre" -version = "0.6.12" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +checksum = "c08309dbcc659c5549a24ddb9b27027640641b282ef5768267c7e675558986a3" dependencies = [ + "autocfg", "indenter", "once_cell", ] [[package]] name = "fastrand" -version = "2.2.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "find-msvc-tools" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b73573e6edcd2af0cdf47bd6cb58f0b3839491263c314eaad1ccf24430e1de" [[package]] name = "float-cmp" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" +checksum = "b09cf3155332e944990140d967ff5eceb70df778b34f77d8075db46e4704e6d8" dependencies = [ "num-traits", ] @@ -805,9 +800,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ "percent-encoding", ] @@ -821,6 +816,16 @@ dependencies = [ "autocfg", ] +[[package]] +name = "fs-err" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91aa448ca50d7e79433bdf3ee8d99215430d2ec02ade5aefab2a073a1822e8a" +dependencies = [ + "autocfg", + "tokio", +] + [[package]] name = "fslock" version = "0.2.1" @@ -839,9 +844,9 @@ checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] name = "futures" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +checksum = "9a31d2a3fbaaeb2af2368bbdd904aa8e812d3c04a1ee10d3171f52d556e5d0a3" dependencies = [ "futures-channel", "futures-core", @@ -854,9 +859,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" dependencies = [ "futures-core", "futures-sink", @@ -864,15 +869,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" [[package]] name = "futures-executor" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432" dependencies = [ "futures-core", "futures-task", @@ -881,44 +886,44 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" [[package]] name = "futures-macro" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 3.0.3", ] [[package]] name = "futures-sink" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" [[package]] name = "futures-task" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" [[package]] name = "futures-timer" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" +checksum = "af43fadb8a98512d547e37b4e92e0ced13e205c061b87b4623eff01d918d6968" [[package]] name = "futures-util" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" dependencies = [ "futures-channel", "futures-core", @@ -928,7 +933,6 @@ dependencies = [ "futures-task", "memchr", "pin-project-lite", - "pin-utils", "slab", ] @@ -968,32 +972,43 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "r-efi", ] [[package]] name = "gimli" -version = "0.28.1" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" [[package]] name = "glob" -version = "0.3.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" [[package]] name = "h2" -version = "0.4.7" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" +checksum = "6cb093c84e8bd9b188d4c4a8cb6579fc016968d14c99882163cd3ff402a4f155" dependencies = [ "atomic-waker", "bytes", @@ -1010,17 +1025,17 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.2" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" [[package]] name = "headers" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322106e6bd0cba2d5ead589ddb8150a13d7c4217cf80d7c4f682ca994ccc6aa9" +checksum = "b3314d5adb5d94bcdf56771f2e50dbbc80bb4bdf88967526706205ac9eff24eb" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "bytes", "headers-core", "http", @@ -1068,20 +1083,19 @@ dependencies = [ [[package]] name = "http" -version = "1.1.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" dependencies = [ "bytes", - "fnv", "itoa", ] [[package]] name = "http-body" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" dependencies = [ "bytes", "http", @@ -1089,12 +1103,12 @@ dependencies = [ [[package]] name = "http-body-util" -version = "0.1.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c" dependencies = [ "bytes", - "futures-util", + "futures-core", "http", "http-body", "pin-project-lite", @@ -1108,9 +1122,9 @@ checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" [[package]] name = "httparse" -version = "1.9.5" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "httpdate" @@ -1120,13 +1134,14 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "1.5.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" +checksum = "d22053281f852e11534f5198498373cbb59295120a20771d90f7ed1897490a72" dependencies = [ + "atomic-waker", "bytes", "futures-channel", - "futures-util", + "futures-core", "h2", "http", "http-body", @@ -1140,12 +1155,11 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.10" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ "bytes", - "futures-util", "http", "http-body", "hyper", @@ -1156,14 +1170,15 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.61" +version = "0.1.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", + "log", "wasm-bindgen", "windows-core", ] @@ -1185,15 +1200,15 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indenter" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" +checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" [[package]] name = "indexmap" -version = "2.7.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", "hashbrown", @@ -1201,9 +1216,9 @@ dependencies = [ [[package]] name = "inout" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" dependencies = [ "generic-array", ] @@ -1214,7 +1229,7 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fddf93031af70e75410a2511ec04d49e758ed2f26dad3404a934e0fb45cc12a" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.13.1", "crossterm", "dyn-clone", "fuzzy-matcher", @@ -1227,39 +1242,41 @@ dependencies = [ [[package]] name = "insta" -version = "1.41.1" +version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9ffc4d4892617c50a928c52b2961cb5174b6fc6ebf252b2fac9d21955c48b8" +checksum = "86f0f8fee8c926415c58d6ae43a08523a26faccb2323f5e6b644fe7dd4ef6b82" dependencies = [ "console", - "lazy_static", - "linked-hash-map", + "once_cell", "pest", "pest_derive", "serde", "similar", - "toml 0.5.11", + "tempfile", + "toml_edit 0.25.13+spec-1.1.0", + "toml_writer", ] [[package]] name = "is_terminal_polyfill" -version = "1.70.1" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "itoa" -version = "1.0.14" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "js-sys" -version = "0.3.74" +version = "0.3.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" +checksum = "0e0c1080212aad755ea003d18543e8768dd432c48819efd73a7bf1e39b7a5a3a" dependencies = [ - "once_cell", + "cfg-if", + "futures-util", "wasm-bindgen", ] @@ -1271,45 +1288,38 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.167" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" - -[[package]] -name = "linked-hash-map" -version = "0.5.6" +version = "0.2.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "lock_api" -version = "0.4.12" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" dependencies = [ - "autocfg", "scopeguard", ] [[package]] name = "log" -version = "0.4.22" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" [[package]] name = "matchers" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" dependencies = [ - "regex-automata 0.1.10", + "regex-automata", ] [[package]] @@ -1331,9 +1341,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.4" +version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" [[package]] name = "mime" @@ -1343,11 +1353,11 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ - "adler", + "adler2", ] [[package]] @@ -1358,19 +1368,19 @@ checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "windows-sys 0.48.0", ] [[package]] name = "mio" -version = "1.0.3" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.52.0", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.61.2", ] [[package]] @@ -1407,12 +1417,11 @@ checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] name = "nu-ansi-term" -version = "0.46.0" +version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "overload", - "winapi", + "windows-sys 0.61.2", ] [[package]] @@ -1426,42 +1435,42 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.37.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.20.2" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] -name = "opaque-debug" -version = "0.3.1" +name = "once_cell_polyfill" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] -name = "overload" -version = "0.1.1" +name = "opaque-debug" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "owo-colors" -version = "3.5.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +checksum = "d211803b9b6b570f68772237e415a029d5a50c65d382910b879fb19d3271f94d" [[package]] name = "parking_lot" -version = "0.12.3" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" dependencies = [ "lock_api", "parking_lot_core", @@ -1469,39 +1478,38 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.10" +version = "0.9.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.6", + "windows-link", ] [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pest" -version = "2.7.14" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" +checksum = "5a07a60cc7a4d00c91f95c685609d1d2f79050e6804b70ebedd7650f0b839bcf" dependencies = [ "memchr", - "thiserror 1.0.69", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.7.14" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d214365f632b123a47fd913301e14c946c61d1c183ee245fa76eb752e59a02dd" +checksum = "b3a83744a5c8455b8b3e0dc5031362780a347c878bdd11584d1a8984228cc88d" dependencies = [ "pest", "pest_generator", @@ -1509,74 +1517,66 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.14" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb55586734301717aea2ac313f50b2eb8f60d2fc3dc01d190eefa2e625f60c4e" +checksum = "e0cd3451aa3de60d4b9a1e736885e4dea6b31617598026f12256ad566d63304a" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.119", ] [[package]] name = "pest_meta" -version = "2.7.14" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b75da2a70cf4d9cb76833c990ac9cd3923c9a8905a8929789ce347c84564d03d" +checksum = "e04d3a0849e241d7dfce834c83b1c5edc8622009e8dd51a12ba1927c32f05496" dependencies = [ - "once_cell", "pest", - "sha2 0.10.8", ] [[package]] name = "pin-project" -version = "1.1.7" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.7" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.119", ] [[package]] name = "pin-project-lite" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "ppv-lite86" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ "zerocopy", ] [[package]] name = "predicates" -version = "3.1.2" +version = "3.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" +checksum = "ada8f2932f28a27ee7b70dd6c1c39ea0675c55a36879ab92f3a715eaa1e63cfe" dependencies = [ "anstyle", "difflib", @@ -1588,15 +1588,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" +checksum = "cad38746f3166b4031b1a0d39ad9f954dd291e7854fcc0eed52ee41a0b50d144" [[package]] name = "predicates-tree" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" +checksum = "d0de1b847b39c8131db0467e9df1ff60e6d0562ab8e9a16e568ad0fdb372e2f2" dependencies = [ "predicates-core", "termtree", @@ -1614,11 +1614,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.2.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit", + "toml_edit 0.25.13+spec-1.1.0", ] [[package]] @@ -1640,14 +1640,14 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.119", ] [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" dependencies = [ "unicode-ident", ] @@ -1662,20 +1662,26 @@ dependencies = [ "byteorder", "hmac", "md-5", - "rand 0.8.5", + "rand 0.8.7", "sha-1", "sha2 0.9.9", ] [[package]] name = "quote" -version = "1.0.37" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + [[package]] name = "rand" version = "0.3.23" @@ -1701,9 +1707,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.8.5" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "22f6172bdec972074665ed81ed53b71da00bfc44b65a753cfde883ec4c702a1a" dependencies = [ "libc", "rand_chacha", @@ -1741,7 +1747,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.17", ] [[package]] @@ -1755,56 +1761,41 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.7" +version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.13.1", ] [[package]] name = "regex" -version = "1.11.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", + "regex-automata", + "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.5", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.5" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" [[package]] name = "relative-path" @@ -1814,15 +1805,14 @@ checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" [[package]] name = "ring" -version = "0.17.8" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.17", "libc", - "spin", "untrusted", "windows-sys 0.52.0", ] @@ -1853,7 +1843,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.90", + "syn 2.0.119", "unicode-ident", ] @@ -1872,9 +1862,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.24" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +checksum = "b74b56ffa8bb2830709a538c2cbcae9aa062db0d2a42563bfb09bdaae44020eb" [[package]] name = "rustc-serialize" @@ -1923,7 +1913,7 @@ dependencies = [ "pin-project", "predicates", "pretty_assertions", - "rand 0.8.5", + "rand 0.8.7", "rstest", "rustls", "serde", @@ -1931,11 +1921,11 @@ dependencies = [ "serde_json", "serial_test", "strum", - "thiserror 2.0.3", + "thiserror 2.0.20", "tokio", "tokio-util", - "toml 0.8.19", - "tower 0.5.1", + "toml", + "tower", "tracing", "tracing-subscriber", "uuid", @@ -1944,22 +1934,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.41" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.13.1", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] name = "rustls" -version = "0.23.19" +version = "0.23.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" +checksum = "0283386ce02abc0151e1761d08802dfe86c173b0b494af5cbc086574e453da06" dependencies = [ "log", "once_cell", @@ -1981,15 +1971,18 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.10.0" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" +dependencies = [ + "zeroize", +] [[package]] name = "rustls-webpki" -version = "0.102.8" +version = "0.103.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +checksum = "0527518605e68109d875e248ea259b6758801cf165e4b2c2733ae3b51f12535a" dependencies = [ "ring", "rustls-pki-types", @@ -1998,15 +1991,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.18" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" [[package]] name = "same-file" @@ -2017,27 +2010,12 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "scc" -version = "2.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66b202022bb57c049555430e11fc22fea12909276a80a4c3d368da36ac1d88ed" -dependencies = [ - "sdd", -] - [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sdd" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49c1eeaf4b6a87c7479688c6d52b9f1153cedd3c489300564f932b065c6eab95" - [[package]] name = "secrecy" version = "0.10.3" @@ -2050,77 +2028,99 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" dependencies = [ "serde", + "serde_core", ] [[package]] name = "serde" -version = "1.0.215" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.215" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 3.0.3", ] [[package]] name = "serde_html_form" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de514ef58196f1fc96dcaef80fe6170a1ce6215df9687a93fe8300e773fefc5" +checksum = "b2f2d7ff8a2140333718bb329f5c40fc5f0865b84c426183ce14c97d2ab8154f" dependencies = [ "form_urlencoded", "indexmap", "itoa", "ryu", - "serde", + "serde_core", ] [[package]] name = "serde_json" -version = "1.0.133" +version = "1.0.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" dependencies = [ "itoa", "memchr", - "ryu", "serde", + "serde_core", + "zmij", ] [[package]] name = "serde_path_to_error" -version = "0.1.16" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" +checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" dependencies = [ "itoa", "serde", + "serde_core", ] [[package]] name = "serde_spanned" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" +dependencies = [ + "serde_core", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -2135,28 +2135,28 @@ dependencies = [ [[package]] name = "serial_test" -version = "3.2.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b258109f244e1d6891bf1053a55d63a5cd4f8f4c30cf9a1280989f80e7a1fa9" +checksum = "699f4197115b8a7e7ff19c9a315a4bd6fffec26cc4626ef45ecaea389e081c6d" dependencies = [ "fslock", - "futures", + "futures-executor", + "futures-util", "log", "once_cell", "parking_lot", - "scc", "serial_test_derive", ] [[package]] name = "serial_test_derive" -version = "3.2.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef" +checksum = "94e153fc76e1c6a068703d6d29c508a0b15c061c4b7e43da59cc097bc342673c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.119", ] [[package]] @@ -2174,9 +2174,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8" dependencies = [ "cfg-if", "cpufeatures", @@ -2198,9 +2198,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", @@ -2218,15 +2218,15 @@ dependencies = [ [[package]] name = "shlex" -version = "1.3.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" [[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", @@ -2234,9 +2234,9 @@ dependencies = [ [[package]] name = "signal-hook-mio" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" +checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc" dependencies = [ "libc", "mio 0.8.11", @@ -2245,49 +2245,47 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ + "errno", "libc", ] [[package]] name = "similar" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e" +checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa" [[package]] name = "slab" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "smallvec" -version = "1.13.2" +version = "1.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" [[package]] name = "socket2" -version = "0.5.8" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] name = "spin" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" [[package]] name = "strsim" @@ -2314,7 +2312,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.90", + "syn 2.0.119", ] [[package]] @@ -2336,9 +2334,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.90" +version = "2.0.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" dependencies = [ "proc-macro2", "quote", @@ -2346,10 +2344,15 @@ dependencies = [ ] [[package]] -name = "sync_wrapper" -version = "0.1.2" +name = "syn" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] [[package]] name = "sync_wrapper" @@ -2369,6 +2372,19 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + [[package]] name = "termcolor" version = "1.4.1" @@ -2380,19 +2396,19 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.4.1" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5352447f921fda68cf61b4101566c0bdb5104eff6804d0678e5227580ab6a4e9" +checksum = "230a1b821ccbd75b185820a1f1ff7b14d21da1e442e22c0863ea5f08771a8874" dependencies = [ "rustix", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "termtree" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" +checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" [[package]] name = "thiserror" @@ -2405,11 +2421,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.3" +version = "2.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f" dependencies = [ - "thiserror-impl 2.0.3", + "thiserror-impl 2.0.20", ] [[package]] @@ -2420,28 +2436,27 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.119", ] [[package]] name = "thiserror-impl" -version = "2.0.3" +version = "2.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" +checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 3.0.3", ] [[package]] name = "thread_local" -version = "1.1.8" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070" dependencies = [ "cfg-if", - "once_cell", ] [[package]] @@ -2457,125 +2472,146 @@ dependencies = [ [[package]] name = "tokio" -version = "1.41.1" +version = "1.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" +checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" dependencies = [ - "backtrace", "bytes", "libc", - "mio 1.0.3", + "mio 1.2.2", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 3.0.3", ] [[package]] name = "tokio-rustls" -version = "0.26.0" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ "rustls", - "rustls-pki-types", "tokio", ] [[package]] name = "tokio-util" -version = "0.7.12" +version = "0.7.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52" dependencies = [ "bytes", "futures-core", "futures-sink", + "libc", "pin-project-lite", "tokio", ] [[package]] name = "toml" -version = "0.5.11" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.11", + "toml_edit 0.22.27", ] [[package]] -name = "toml" -version = "0.8.19" +name = "toml_datetime" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" dependencies = [ "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", ] [[package]] name = "toml_datetime" -version = "0.6.8" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" dependencies = [ - "serde", + "serde_core", ] [[package]] name = "toml_edit" -version = "0.22.22" +version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ "indexmap", "serde", - "serde_spanned", - "toml_datetime", - "winnow", + "serde_spanned 0.6.9", + "toml_datetime 0.6.11", + "toml_write", + "winnow 0.7.15", ] [[package]] -name = "tower" -version = "0.4.13" +name = "toml_edit" +version = "0.25.13+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +checksum = "6975367e4d2ef766d86af01ffad14b622fecc8d4357a998fbc4deb6e9bacaf9b" dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tower-layer", - "tower-service", - "tracing", + "indexmap", + "serde_core", + "serde_spanned 1.1.1", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 1.0.4", ] +[[package]] +name = "toml_parser" +version = "1.1.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56" +dependencies = [ + "winnow 1.0.4", +] + +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + +[[package]] +name = "toml_writer" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2" + [[package]] name = "tower" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ "futures-core", "futures-util", "pin-project-lite", - "sync_wrapper 0.1.2", + "sync_wrapper", "tokio", "tower-layer", "tower-service", @@ -2596,9 +2632,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.41" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "log", "pin-project-lite", @@ -2608,20 +2644,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.28" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.119", ] [[package]] name = "tracing-core" -version = "0.1.33" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", "valuable", @@ -2640,14 +2676,14 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.19" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" dependencies = [ "matchers", "nu-ansi-term", "once_cell", - "regex", + "regex-automata", "sharded-slab", "smallvec", "thread_local", @@ -2668,9 +2704,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.17.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" [[package]] name = "ucd-trie" @@ -2680,15 +2716,15 @@ checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "unicode-ident" -version = "1.0.14" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unicode-segmentation" -version = "1.12.0" +version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" [[package]] name = "unicode-width" @@ -2716,18 +2752,20 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.11.0" +version = "1.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +checksum = "bf3923a6f5c4c6382e0b653c4117f48d631ea17f38ed86e2a828e6f7412f5239" dependencies = [ - "getrandom", + "getrandom 0.4.3", + "js-sys", + "wasm-bindgen", ] [[package]] name = "valuable" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "version_check" @@ -2737,9 +2775,9 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wait-timeout" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" dependencies = [ "libc", ] @@ -2762,41 +2800,28 @@ checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasm-bindgen" -version = "0.2.97" +version = "0.2.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" +checksum = "1b70935747edd64d89de3efa29d73789b806c15798f8e7dca4d8ac356b50ce70" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.97" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.90", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.97" +version = "0.2.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" +checksum = "77775f8f3f7217702089053b94958f8f54061a3f663417df76e19cbdcca29bc1" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2804,22 +2829,25 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.97" +version = "0.2.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" +checksum = "e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284" dependencies = [ + "bumpalo", "proc-macro2", "quote", - "syn 2.0.90", - "wasm-bindgen-backend", + "syn 2.0.119", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.97" +version = "0.2.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" +checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf" +dependencies = [ + "unicode-ident", +] [[package]] name = "winapi" @@ -2839,11 +2867,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -2854,11 +2882,61 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.52.0" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ - "windows-targets 0.52.6", + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", ] [[package]] @@ -2881,11 +2959,11 @@ dependencies = [ [[package]] name = "windows-sys" -version = "0.59.0" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-targets 0.52.6", + "windows-link", ] [[package]] @@ -3011,9 +3089,18 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.20" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" dependencies = [ "memchr", ] @@ -3026,27 +3113,32 @@ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "zerocopy" -version = "0.7.35" +version = "0.8.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +checksum = "556764e583adb45a9f8d413c2a147fa7e8d821e48e12b14fd560b607998b75eb" dependencies = [ - "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.35" +version = "0.8.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +checksum = "f2ab42fc20575779bd240faa45f94a74256f755c0fa9e89f0ede20d91d0cdfc1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.119", ] [[package]] name = "zeroize" -version = "1.8.1" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" + +[[package]] +name = "zmij" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/Cargo.toml b/Cargo.toml index 6beb5eb..23fd3fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ axum-extra = { version = "0.9", features = ["typed-header", "query", "async-read axum-macros = "0.4" axum-range = "0.4" axum-server = { version = "0.7", features = ["tls-rustls-no-provider"] } -chrono = { version = "0.4.38", features = ["serde"] } +chrono = { version = "0.4.45", features = ["serde"] } clap = { version = "4", features = ["derive", "env", "wrap_help"] } conflate = "0.3.3" displaydoc = "0.2" @@ -69,7 +69,7 @@ tokio-util = { version = "0.7", features = ["io", "io-util"] } toml = "0.8" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } -uuid = { version = "1.11.0", features = ["v4"] } +uuid = { version = "1.24.0", features = ["v4"] } walkdir = "2" [dependencies.abscissa_core] @@ -79,7 +79,7 @@ version = "0.8.1" # features = ["gimli-backtrace"] [dependencies.rustls] -version = "0.23.17" +version = "0.23.43" features = ["logging", "std", "ring", "tls12"] default-features = false @@ -90,7 +90,7 @@ assert_cmd = "2" base64 = "0.22" dircmp = "0.2" insta = { version = "1", features = ["redactions", "toml"] } -once_cell = "1.20" +once_cell = "1.21" predicates = "3.1.2" pretty_assertions = "1" rstest = "0.23" diff --git a/src/snapshots/rustic_server__htpasswd__test__htpasswd_passes.snap b/src/snapshots/rustic_server__htpasswd__test__htpasswd_passes.snap index e276db8..0b4a430 100644 --- a/src/snapshots/rustic_server__htpasswd__test__htpasswd_passes.snap +++ b/src/snapshots/rustic_server__htpasswd__test__htpasswd_passes.snap @@ -6,7 +6,6 @@ path = '' [credentials.Administrator] name = 'Administrator' hash = '[hash]' - [credentials.backup-user] name = 'backup-user' hash = '[hash]' From 9c4317bf7fa06d343bb5f756814b94563e08f878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Fri, 14 Aug 2026 07:03:33 +0000 Subject: [PATCH 02/15] chore(deps): drop unused dependencies http-range, inquire, pin-project, dircmp and once_cell are not referenced anywhere in the crate. --- Cargo.lock | 274 +++-------------------------------------------------- Cargo.toml | 5 - 2 files changed, 14 insertions(+), 265 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ce100ad..88e9daa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -381,12 +381,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.13.1" @@ -624,31 +618,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crossterm" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" -dependencies = [ - "bitflags 1.3.2", - "crossterm_winapi", - "libc", - "mio 0.8.11", - "parking_lot", - "signal-hook", - "signal-hook-mio", - "winapi", -] - -[[package]] -name = "crossterm_winapi" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" -dependencies = [ - "winapi", -] - [[package]] name = "crypto-common" version = "0.1.7" @@ -700,18 +669,6 @@ dependencies = [ "crypto-common", ] -[[package]] -name = "dircmp" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ca7fa3ba397980657070e679f412acddb7a372f1793ff68ef0bbe708680f0f" -dependencies = [ - "regex", - "sha2 0.10.9", - "thiserror 1.0.69", - "walkdir", -] - [[package]] name = "displaydoc" version = "0.2.7" @@ -723,12 +680,6 @@ dependencies = [ "syn 3.0.3", ] -[[package]] -name = "dyn-clone" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" - [[package]] name = "encode_unicode" version = "1.0.0" @@ -936,24 +887,6 @@ dependencies = [ "slab", ] -[[package]] -name = "fuzzy-matcher" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94" -dependencies = [ - "thread_local", -] - -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "gcc" version = "0.3.55" @@ -1114,12 +1047,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "http-range" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" - [[package]] name = "httparse" version = "1.10.1" @@ -1223,23 +1150,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "inquire" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fddf93031af70e75410a2511ec04d49e758ed2f26dad3404a934e0fb45cc12a" -dependencies = [ - "bitflags 2.13.1", - "crossterm", - "dyn-clone", - "fuzzy-matcher", - "fxhash", - "newline-converter", - "once_cell", - "unicode-segmentation", - "unicode-width", -] - [[package]] name = "insta" version = "1.48.0" @@ -1360,18 +1270,6 @@ dependencies = [ "adler2", ] -[[package]] -name = "mio" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -dependencies = [ - "libc", - "log", - "wasi 0.11.1+wasi-snapshot-preview1", - "windows-sys 0.48.0", -] - [[package]] name = "mio" version = "1.2.2" @@ -1400,15 +1298,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "newline-converter" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b6b097ecb1cbfed438542d16e84fd7ad9b0c76c8a65b7f9039212a3d14dc7f" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "normalize-line-endings" version = "0.3.0" @@ -1664,7 +1553,7 @@ dependencies = [ "md-5", "rand 0.8.7", "sha-1", - "sha2 0.9.9", + "sha2", ] [[package]] @@ -1765,7 +1654,7 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.13.1", + "bitflags", ] [[package]] @@ -1900,17 +1789,12 @@ dependencies = [ "chrono", "clap", "conflate", - "dircmp", "displaydoc", "futures", "futures-util", "htpasswd-verify", "http-body-util", - "http-range", - "inquire", "insta", - "once_cell", - "pin-project", "predicates", "pretty_assertions", "rand 0.8.7", @@ -1921,7 +1805,7 @@ dependencies = [ "serde_json", "serial_test", "strum", - "thiserror 2.0.20", + "thiserror", "tokio", "tokio-util", "toml", @@ -1938,7 +1822,7 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags 2.13.1", + "bitflags", "errno", "libc", "linux-raw-sys", @@ -2196,17 +2080,6 @@ dependencies = [ "opaque-debug", ] -[[package]] -name = "sha2" -version = "0.10.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - [[package]] name = "sharded-slab" version = "0.1.7" @@ -2222,27 +2095,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" -[[package]] -name = "signal-hook" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2" -dependencies = [ - "libc", - "signal-hook-registry", -] - -[[package]] -name = "signal-hook-mio" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc" -dependencies = [ - "libc", - "mio 0.8.11", - "signal-hook", -] - [[package]] name = "signal-hook-registry" version = "1.4.8" @@ -2410,33 +2262,13 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - [[package]] name = "thiserror" version = "2.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f" dependencies = [ - "thiserror-impl 2.0.20", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", + "thiserror-impl", ] [[package]] @@ -2478,7 +2310,7 @@ checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" dependencies = [ "bytes", "libc", - "mio 1.2.2", + "mio", "parking_lot", "pin-project-lite", "signal-hook-registry", @@ -2720,18 +2552,6 @@ version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" -[[package]] -name = "unicode-segmentation" -version = "1.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" - -[[package]] -name = "unicode-width" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" - [[package]] name = "unicode-xid" version = "0.2.6" @@ -2939,22 +2759,13 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -2966,67 +2777,34 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - [[package]] name = "windows-targets" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -3039,48 +2817,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" diff --git a/Cargo.toml b/Cargo.toml index 23fd3fa..5cacd2c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,9 +56,6 @@ futures = "0.3" futures-util = "0.3" htpasswd-verify = "0.3" http-body-util = "0.1" -http-range = "0.1" -inquire = "0.7" -pin-project = "1" rand = "0.8" serde = { version = "1", default-features = false, features = ["derive"] } serde_derive = "1" @@ -88,9 +85,7 @@ abscissa_core = { version = "0.8.1", features = ["testing"] } anyhow = "1" assert_cmd = "2" base64 = "0.22" -dircmp = "0.2" insta = { version = "1", features = ["redactions", "toml"] } -once_cell = "1.21" predicates = "3.1.2" pretty_assertions = "1" rstest = "0.23" From 701a10645ec71d26110f9065de68230f42a83700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Fri, 14 Aug 2026 07:05:29 +0000 Subject: [PATCH 03/15] chore(deps)!: update rand, strum, toml and dev-dependencies to new majors - rand 0.8 -> 0.10: `distributions` is now `distr`, `thread_rng()` is `rng()` and the convenience methods moved from `Rng` to `RngExt` - strum 0.26 -> 0.28 - toml 0.8 -> 1.1 - base64 0.22 -> 0.23, rstest 0.23 -> 0.26, serial_test 3 -> 4 --- Cargo.lock | 103 +++++++++++++++++++++++++++++++++++++----------- Cargo.toml | 12 +++--- src/htpasswd.rs | 6 +-- 3 files changed, 89 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 88e9daa..b529859 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -21,7 +21,7 @@ dependencies = [ "semver", "serde", "termcolor", - "toml", + "toml 0.8.23", "tracing", "tracing-log", "tracing-subscriber", @@ -369,6 +369,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" + [[package]] name = "bcrypt" version = "0.13.0" @@ -477,6 +483,17 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" +[[package]] +name = "chacha20" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "rand_core 0.10.1", +] + [[package]] name = "chrono" version = "0.4.45" @@ -618,6 +635,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + [[package]] name = "crypto-common" version = "0.1.7" @@ -923,6 +949,7 @@ dependencies = [ "cfg-if", "libc", "r-efi", + "rand_core 0.10.1", ] [[package]] @@ -1605,6 +1632,17 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" +dependencies = [ + "chacha20", + "getrandom 0.4.3", + "rand_core 0.10.1", +] + [[package]] name = "rand_chacha" version = "0.3.1" @@ -1639,6 +1677,12 @@ dependencies = [ "getrandom 0.2.17", ] +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + [[package]] name = "rdrand" version = "0.4.0" @@ -1708,21 +1752,20 @@ dependencies = [ [[package]] name = "rstest" -version = "0.23.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a2c585be59b6b5dd66a9d2084aa1d8bd52fbdb806eafdeffb52791147862035" +checksum = "f5a3193c063baaa2a95a33f03035c8a72b83d97a54916055ba22d35ed3839d49" dependencies = [ - "futures", "futures-timer", + "futures-util", "rstest_macros", - "rustc_version", ] [[package]] name = "rstest_macros" -version = "0.23.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "825ea780781b15345a146be27eaefb05085e337e869bff01b4306a4fd4a9ad5a" +checksum = "9c845311f0ff7951c5506121a9ad75aec44d083c31583b2ea5a30bcb0b0abba0" dependencies = [ "cfg-if", "glob", @@ -1785,7 +1828,7 @@ dependencies = [ "axum-macros", "axum-range", "axum-server", - "base64 0.22.1", + "base64 0.23.1", "chrono", "clap", "conflate", @@ -1797,7 +1840,7 @@ dependencies = [ "insta", "predicates", "pretty_assertions", - "rand 0.8.7", + "rand 0.10.2", "rstest", "rustls", "serde", @@ -1808,7 +1851,7 @@ dependencies = [ "thiserror", "tokio", "tokio-util", - "toml", + "toml 1.1.4+spec-1.1.0", "tower", "tracing", "tracing-subscriber", @@ -2019,9 +2062,9 @@ dependencies = [ [[package]] name = "serial_test" -version = "3.5.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "699f4197115b8a7e7ff19c9a315a4bd6fffec26cc4626ef45ecaea389e081c6d" +checksum = "a6df5ed973ad8d834e09f824f9e9f449af6b9a3745f78dec7cc752770bd3bf11" dependencies = [ "fslock", "futures-executor", @@ -2034,13 +2077,13 @@ dependencies = [ [[package]] name = "serial_test_derive" -version = "3.5.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94e153fc76e1c6a068703d6d29c508a0b15c061c4b7e43da59cc097bc342673c" +checksum = "a22144e767da4ddd8416dbf383700542ffd8a5dc493dfecedfe1fe3ad03c98ae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.3", ] [[package]] @@ -2051,7 +2094,7 @@ checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", "cfg-if", - "cpufeatures", + "cpufeatures 0.2.17", "digest 0.9.0", "opaque-debug", ] @@ -2063,7 +2106,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8" dependencies = [ "cfg-if", - "cpufeatures", + "cpufeatures 0.2.17", "digest 0.10.7", ] @@ -2075,7 +2118,7 @@ checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", "cfg-if", - "cpufeatures", + "cpufeatures 0.2.17", "digest 0.9.0", "opaque-debug", ] @@ -2147,23 +2190,22 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.26.3" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.26.4" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664" dependencies = [ "heck", "proc-macro2", "quote", - "rustversion", "syn 2.0.119", ] @@ -2366,6 +2408,21 @@ dependencies = [ "toml_edit 0.22.27", ] +[[package]] +name = "toml" +version = "1.1.4+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3aace63f4bbcdfc2c965b059de67119c89c4017a70d633be6c104910f67056f5" +dependencies = [ + "indexmap", + "serde_core", + "serde_spanned 1.1.1", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 1.0.4", +] + [[package]] name = "toml_datetime" version = "0.6.11" diff --git a/Cargo.toml b/Cargo.toml index 5cacd2c..6f3ec5b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,14 +56,14 @@ futures = "0.3" futures-util = "0.3" htpasswd-verify = "0.3" http-body-util = "0.1" -rand = "0.8" +rand = "0.10" serde = { version = "1", default-features = false, features = ["derive"] } serde_derive = "1" -strum = { version = "0.26", features = ["derive"] } +strum = { version = "0.28", features = ["derive"] } thiserror = "2" tokio = { version = "1", features = ["full"] } tokio-util = { version = "0.7", features = ["io", "io-util"] } -toml = "0.8" +toml = "1.1" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } uuid = { version = "1.24.0", features = ["v4"] } @@ -84,14 +84,14 @@ default-features = false abscissa_core = { version = "0.8.1", features = ["testing"] } anyhow = "1" assert_cmd = "2" -base64 = "0.22" +base64 = "0.23" insta = { version = "1", features = ["redactions", "toml"] } predicates = "3.1.2" pretty_assertions = "1" -rstest = "0.23" +rstest = "0.26" serde_json = "1" # reqwest = "0.11.18" -serial_test = { version = "3.2.0", features = ["file_locks"] } +serial_test = { version = "4.0.1", features = ["file_locks"] } tower = "0.5" # see: https://nnethercote.github.io/perf-book/build-configuration.html diff --git a/src/htpasswd.rs b/src/htpasswd.rs index d441a64..5857ebf 100644 --- a/src/htpasswd.rs +++ b/src/htpasswd.rs @@ -7,7 +7,7 @@ use std::{ }; use htpasswd_verify::md5::{format_hash, md5_apr1_encode}; -use rand::{distributions::Alphanumeric, thread_rng, Rng}; +use rand::{distr::Alphanumeric, rng, RngExt}; use serde::Serialize; use crate::error::{ApiErrorKind, ApiResult, AppResult, ErrorKind}; @@ -157,8 +157,8 @@ pub struct Credential { impl Credential { pub fn new(name: &str, pass: &str) -> Self { - let salt: String = thread_rng() - .sample_iter(&Alphanumeric) + let salt: String = rng() + .sample_iter(Alphanumeric) .take(constants::SALT_LEN) .map(char::from) .collect(); From ace6af010573432e4f4ae28dea80c813fe9c652b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Fri, 14 Aug 2026 07:06:27 +0000 Subject: [PATCH 04/15] chore(deps)!: update abscissa to 0.9 abscissa_core and abscissa_tokio 0.8 -> 0.9, no source changes required. --- Cargo.lock | 113 +++++++++++++---------------------------------------- Cargo.toml | 6 +-- 2 files changed, 31 insertions(+), 88 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b529859..02b0902 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "abscissa_core" -version = "0.8.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3083187ad864402d6bde86c5b51767b921edf4d02bf03b8ba40172dbd2a9773b" +checksum = "7cd87587023faadfc7f6e93b1ad45074b72f1f6d22c1e0f19333a952446ab1c1" dependencies = [ "abscissa_derive", "arc-swap", @@ -14,14 +14,14 @@ dependencies = [ "canonical-path", "clap", "color-eyre", - "fs-err 2.11.0", + "fs-err", "once_cell", "regex", "secrecy", "semver", "serde", "termcolor", - "toml 0.8.23", + "toml 0.9.12+spec-1.1.0", "tracing", "tracing-log", "tracing-subscriber", @@ -30,22 +30,22 @@ dependencies = [ [[package]] name = "abscissa_derive" -version = "0.8.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d914621d2ef4da433fe01907e323ee3f2807738d392d5a34c287b381f87fe2" +checksum = "3da54f552dccbdec19736d713720dd88af932a82eb02ca0f22410de5d31ad726" dependencies = [ "ident_case", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.119", "synstructure", ] [[package]] name = "abscissa_tokio" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbfe75534601ac38dd9119c552c97b91814b079c065efdbfcabd7a1eb998c23e" +checksum = "06466251d77b85dae0e3012ca60bc0e2d856b2aa03446f264e9ab9fe838e891b" dependencies = [ "abscissa_core", "tokio", @@ -322,7 +322,7 @@ checksum = "c1ab4a3ec9ea8a657c72d99a03a824af695bd0fb5ec639ccbd9cd3543b41a5f9" dependencies = [ "arc-swap", "bytes", - "fs-err 3.3.1", + "fs-err", "http", "http-body", "hyper", @@ -784,15 +784,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fs-err" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" -dependencies = [ - "autocfg", -] - [[package]] name = "fs-err" version = "3.3.1" @@ -1190,7 +1181,7 @@ dependencies = [ "serde", "similar", "tempfile", - "toml_edit 0.25.13+spec-1.1.0", + "toml_edit", "toml_writer", ] @@ -1534,7 +1525,7 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit 0.25.13+spec-1.1.0", + "toml_edit", ] [[package]] @@ -2030,15 +2021,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "serde_spanned" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" -dependencies = [ - "serde", -] - [[package]] name = "serde_spanned" version = "1.1.1" @@ -2215,17 +2197,6 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - [[package]] name = "syn" version = "2.0.119" @@ -2256,14 +2227,13 @@ checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" [[package]] name = "synstructure" -version = "0.12.6" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", - "unicode-xid", + "syn 2.0.119", ] [[package]] @@ -2398,14 +2368,16 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.23" +version = "0.9.12+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" dependencies = [ - "serde", - "serde_spanned 0.6.9", - "toml_datetime 0.6.11", - "toml_edit 0.22.27", + "serde_core", + "serde_spanned", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 0.7.15", ] [[package]] @@ -2416,7 +2388,7 @@ checksum = "3aace63f4bbcdfc2c965b059de67119c89c4017a70d633be6c104910f67056f5" dependencies = [ "indexmap", "serde_core", - "serde_spanned 1.1.1", + "serde_spanned", "toml_datetime 1.1.1+spec-1.1.0", "toml_parser", "toml_writer", @@ -2425,11 +2397,11 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.11" +version = "0.7.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -2441,20 +2413,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "toml_edit" -version = "0.22.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" -dependencies = [ - "indexmap", - "serde", - "serde_spanned 0.6.9", - "toml_datetime 0.6.11", - "toml_write", - "winnow 0.7.15", -] - [[package]] name = "toml_edit" version = "0.25.13+spec-1.1.0" @@ -2463,7 +2421,7 @@ checksum = "6975367e4d2ef766d86af01ffad14b622fecc8d4357a998fbc4deb6e9bacaf9b" dependencies = [ "indexmap", "serde_core", - "serde_spanned 1.1.1", + "serde_spanned", "toml_datetime 1.1.1+spec-1.1.0", "toml_parser", "toml_writer", @@ -2479,12 +2437,6 @@ dependencies = [ "winnow 1.0.4", ] -[[package]] -name = "toml_write" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" - [[package]] name = "toml_writer" version = "1.1.2+spec-1.1.0" @@ -2609,12 +2561,6 @@ version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" -[[package]] -name = "unicode-xid" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" - [[package]] name = "untrusted" version = "0.9.0" @@ -2903,9 +2849,6 @@ name = "winnow" version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" -dependencies = [ - "memchr", -] [[package]] name = "winnow" diff --git a/Cargo.toml b/Cargo.toml index 6f3ec5b..ac30c93 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ license = false eula = false [dependencies] -abscissa_tokio = "0.8.0" +abscissa_tokio = "0.9.0" anyhow = "1" async-trait = "0.1" axum = { version = "0.7", features = ["tracing", "multipart", "http2", "macros"] } @@ -70,7 +70,7 @@ uuid = { version = "1.24.0", features = ["v4"] } walkdir = "2" [dependencies.abscissa_core] -version = "0.8.1" +version = "0.9.0" # optional: use `gimli` to capture backtraces # see https://github.com/rust-lang/backtrace-rs/issues/189 # features = ["gimli-backtrace"] @@ -81,7 +81,7 @@ features = ["logging", "std", "ring", "tls12"] default-features = false [dev-dependencies] -abscissa_core = { version = "0.8.1", features = ["testing"] } +abscissa_core = { version = "0.9.0", features = ["testing"] } anyhow = "1" assert_cmd = "2" base64 = "0.23" From a756eedf96d87784d2e0b457b7392ca1fce78179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Fri, 14 Aug 2026 07:08:56 +0000 Subject: [PATCH 05/15] chore(deps)!: migrate the axum stack to axum 0.8 - axum 0.7 -> 0.8, axum-extra 0.9 -> 0.12, axum-macros 0.4 -> 0.5, axum-auth 0.7 -> 0.8, axum-server 0.7 -> 0.8, axum-range 0.4 -> 1 - path captures use the new `{param}` syntax instead of `:param` - `FromRequestParts` no longer needs `#[async_trait]` axum-server 0.8 also drops the unmaintained rustls-pemfile dependency. --- Cargo.lock | 101 +++++++++++++++++++++++++--------------------- Cargo.toml | 12 +++--- src/auth.rs | 1 - src/typed_path.rs | 24 +++++------ src/web.rs | 18 ++++----- 5 files changed, 83 insertions(+), 73 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 02b0902..2a3f13e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -189,14 +189,14 @@ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "axum" -version = "0.7.9" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" +checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90" dependencies = [ - "async-trait", "axum-core", "axum-macros", "bytes", + "form_urlencoded", "futures-util", "http", "http-body", @@ -210,8 +210,7 @@ dependencies = [ "multer", "percent-encoding", "pin-project-lite", - "rustversion", - "serde", + "serde_core", "serde_json", "serde_path_to_error", "serde_urlencoded", @@ -225,32 +224,52 @@ dependencies = [ [[package]] name = "axum-auth" -version = "0.7.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8169113a185f54f68614fcfc3581df585d30bf8542bcb99496990e1025e4120a" +checksum = "93495037c01c639b198ecb926b58f7f1c0d61ae663edcd61b2dd679f2a0bffe6" dependencies = [ - "async-trait", "axum-core", - "base64 0.21.7", + "base64 0.22.1", "http", ] [[package]] name = "axum-core" -version = "0.4.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" dependencies = [ - "async-trait", + "bytes", + "futures-core", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "sync_wrapper", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-extra" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9963ff19f40c6102c76756ef0a46004c0d58957d87259fc9208ff8441c12ab96" +dependencies = [ + "axum", + "axum-core", "bytes", "futures-util", + "headers", "http", "http-body", "http-body-util", "mime", "pin-project-lite", "rustversion", - "sync_wrapper", + "serde_core", "tower-layer", "tower-service", "tracing", @@ -258,41 +277,42 @@ dependencies = [ [[package]] name = "axum-extra" -version = "0.9.6" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c794b30c904f0a1c2fb7740f7df7f7972dfaa14ef6f57cb6178dc63e5dca2f04" +checksum = "be44683b41ccb9ab2d23a5230015c9c3c55be97a25e4428366de8873103f7970" dependencies = [ "axum", "axum-core", "axum-macros", "bytes", - "fastrand", "form_urlencoded", + "futures-core", "futures-util", "headers", "http", "http-body", "http-body-util", "mime", - "multer", "percent-encoding", "pin-project-lite", - "serde", + "rustversion", + "serde_core", "serde_html_form", "serde_json", + "serde_path_to_error", "tokio", "tokio-util", - "tower", "tower-layer", "tower-service", + "tracing", "typed-json", ] [[package]] name = "axum-macros" -version = "0.4.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d123550fa8d071b7255cb0cc04dc302baa6c8c4a79f55701552684d8399bce" +checksum = "7aa268c23bfbbd2c4363b9cd302a4f504fb2a9dfe7e3451d66f35dd392e20aca" dependencies = [ "proc-macro2", "quote", @@ -301,12 +321,12 @@ dependencies = [ [[package]] name = "axum-range" -version = "0.4.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c30398a7f716ebdd7f3c8a4f7a7a6df48a30e002007fd57b2a7a00fac864bd" +checksum = "6a30717ba4cd96521a74b1b847660f2823bc47d8da41db49a024552849fe9f5b" dependencies = [ "axum", - "axum-extra", + "axum-extra 0.10.3", "bytes", "futures", "http-body", @@ -316,12 +336,13 @@ dependencies = [ [[package]] name = "axum-server" -version = "0.7.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ab4a3ec9ea8a657c72d99a03a824af695bd0fb5ec639ccbd9cd3543b41a5f9" +checksum = "b1df331683d982a0b9492b38127151e6453639cd34926eb9c07d4cd8c6d22bfc" dependencies = [ "arc-swap", "bytes", + "either", "fs-err", "http", "http-body", @@ -329,7 +350,6 @@ dependencies = [ "hyper-util", "pin-project-lite", "rustls", - "rustls-pemfile", "rustls-pki-types", "tokio", "tokio-rustls", @@ -357,12 +377,6 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -706,6 +720,12 @@ dependencies = [ "syn 3.0.3", ] +[[package]] +name = "either" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d" + [[package]] name = "encode_unicode" version = "1.0.0" @@ -1252,9 +1272,9 @@ dependencies = [ [[package]] name = "matchit" -version = "0.7.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" [[package]] name = "md-5" @@ -1815,7 +1835,7 @@ dependencies = [ "async-trait", "axum", "axum-auth", - "axum-extra", + "axum-extra 0.12.6", "axum-macros", "axum-range", "axum-server", @@ -1878,15 +1898,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "rustls-pemfile" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "rustls-pki-types" version = "1.15.1" diff --git a/Cargo.toml b/Cargo.toml index ac30c93..786fc62 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,12 +41,12 @@ eula = false abscissa_tokio = "0.9.0" anyhow = "1" async-trait = "0.1" -axum = { version = "0.7", features = ["tracing", "multipart", "http2", "macros"] } -axum-auth = "0.7" -axum-extra = { version = "0.9", features = ["typed-header", "query", "async-read-body", "typed-routing", "erased-json"] } -axum-macros = "0.4" -axum-range = "0.4" -axum-server = { version = "0.7", features = ["tls-rustls-no-provider"] } +axum = { version = "0.8", features = ["tracing", "multipart", "http2", "macros"] } +axum-auth = "0.8" +axum-extra = { version = "0.12", features = ["typed-header", "query", "async-read-body", "typed-routing", "erased-json"] } +axum-macros = "0.5" +axum-range = "1" +axum-server = { version = "0.8", features = ["tls-rustls-no-provider"] } chrono = { version = "0.4.45", features = ["serde"] } clap = { version = "4", features = ["derive", "env", "wrap_help"] } conflate = "0.3.3" diff --git a/src/auth.rs b/src/auth.rs index 6520c8f..bbb3cec 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -72,7 +72,6 @@ pub struct BasicAuthFromRequest { pub(crate) _password: SecretString, } -#[async_trait::async_trait] impl FromRequestParts for BasicAuthFromRequest { type Rejection = ApiErrorKind; diff --git a/src/typed_path.rs b/src/typed_path.rs index e047ec7..003ae3b 100644 --- a/src/typed_path.rs +++ b/src/typed_path.rs @@ -54,9 +54,9 @@ impl TpeKind { } } -// A type safe route with `"/:repo/config"` as its associated path. +// A type safe route with `"/{repo}/config"` as its associated path. #[derive(TypedPath, Deserialize, Debug)] -#[typed_path("/:repo/config")] +#[typed_path("/{repo}/config")] pub struct RepositoryConfigPath { pub repo: String, } @@ -67,9 +67,9 @@ impl PathParts for RepositoryConfigPath { } } -// A type safe route with `"/:repo/"` as its associated path. +// A type safe route with `"/{repo}/"` as its associated path. #[derive(TypedPath, Deserialize, Debug)] -#[typed_path("/:repo/")] +#[typed_path("/{repo}/")] pub struct RepositoryPath { pub repo: String, } @@ -80,9 +80,9 @@ impl PathParts for RepositoryPath { } } -// A type safe route with `"/:tpe"` as its associated path. +// A type safe route with `"/{tpe}"` as its associated path. #[derive(TypedPath, Deserialize, Debug, Copy, Clone)] -#[typed_path("/:tpe")] +#[typed_path("/{tpe}")] pub struct TpePath { pub tpe: TpeKind, } @@ -93,9 +93,9 @@ impl PathParts for TpePath { } } -// A type safe route with `"/:repo/:tpe/"` as its associated path. +// A type safe route with `"/{repo}/{tpe}/"` as its associated path. #[derive(TypedPath, Deserialize, Debug)] -#[typed_path("/:repo/:tpe/")] +#[typed_path("/{repo}/{tpe}/")] pub struct RepositoryTpePath { pub repo: String, pub tpe: TpeKind, @@ -111,9 +111,9 @@ impl PathParts for RepositoryTpePath { } } -// A type safe route with `"/:tpe/:name"` as its associated path. +// A type safe route with `"/{tpe}/{name}"` as its associated path. #[derive(TypedPath, Deserialize, Debug)] -#[typed_path("/:tpe/:name")] +#[typed_path("/{tpe}/{name}")] pub struct TpeNamePath { pub tpe: TpeKind, pub name: String, @@ -129,9 +129,9 @@ impl PathParts for TpeNamePath { } } -// A type safe route with `"/:repo/:tpe/:name"` as its associated path. +// A type safe route with `"/{repo}/{tpe}/{name}"` as its associated path. #[derive(TypedPath, Deserialize, Debug)] -#[typed_path("/:repo/:tpe/:name")] +#[typed_path("/{repo}/{tpe}/{name}")] pub struct RepositoryTpeNamePath { pub repo: String, pub tpe: TpeKind, diff --git a/src/web.rs b/src/web.rs index d0ec4a7..da0753b 100644 --- a/src/web.rs +++ b/src/web.rs @@ -59,7 +59,7 @@ where // Returns “200 OK” if the server is ready to accept requests. // app = app.route("/health/ready", get(ready_check)); - // /:repo/:tpe/:name + // /{repo}/{tpe}/{name} app = app // Returns “200 OK” if the blob with the given name and type is stored in the repository, // “404 not found” otherwise. If the blob exists, the HTTP header Content-Length @@ -82,7 +82,7 @@ where // the repository, an HTTP error otherwise. .typed_delete(delete_file::); - // /:repo/config + // /{repo}/config app = app // Returns “200 OK” if the repository has a configuration, an HTTP error otherwise. .typed_head(has_config) @@ -100,7 +100,7 @@ where // to allow for the deletion of the configuration file during testing. .typed_delete(delete_config::); - // /:repo/:tpe/ + // /{repo}/{tpe}/ // # API version 1 // // Returns a JSON array containing the names of all the blobs stored for a given type, example: @@ -139,7 +139,7 @@ where // ] app = app.typed_get(list_files::); - // /:repo/ --> note: trailing slash + // /{repo}/ --> note: trailing slash app = app // This request is used to initially create a new repository. // The server responds with “200 OK” if the repository structure was created @@ -153,10 +153,10 @@ where // TODO: This is not reflected in the API documentation? // TODO: Decide if we want to keep this or not! - // // /:tpe/:name - // // we loop here over explicit types, to prevent conflict with paths "/:repo/:tpe" + // // /{tpe}/{name} + // // we loop here over explicit types, to prevent conflict with paths "/{repo}/{tpe}" // for tpe in constants::TYPES.into_iter() { - // let path = format!("/{}:name", &tpe); + // let path = format!("/{}{{name}}", &tpe); // app = app // .route(path.as_str(), head(file_length::)) // .route(path.as_str(), get(get_file::)) @@ -164,8 +164,8 @@ where // .route(path.as_str(), delete(delete_file::)); // } // - // /:tpe --> note: NO trailing slash - // we loop here over explicit types, to prevent the conflict with paths "/:repo/" + // /{tpe} --> note: NO trailing slash + // we loop here over explicit types, to prevent the conflict with paths "/{repo}/" // for tpe in constants::TYPES.into_iter() { // let path = format!("/{}", &tpe); // app = app.route(path.as_str(), get(list_files::)); From a94cf1c0bd2deabeedb86d58dcc5559976b6fb0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Fri, 14 Aug 2026 07:09:54 +0000 Subject: [PATCH 06/15] chore: fix clippy lint configuration and resulting warnings `bad_style` is a lint group, so it needs an explicit lower priority than the individual lints in the table; without it clippy refuses to run on current toolchains. Also resolve the warnings this uncovers: drop an unused import, remove a needless `return`, use `io::Error::other`, iterate over map values and inline format arguments. --- Cargo.toml | 2 +- src/acl.rs | 2 -- src/auth.rs | 4 ++-- src/commands/auth.rs | 2 +- src/handlers/file_exchange.rs | 2 +- src/handlers/repository.rs | 4 ++-- src/htpasswd.rs | 2 +- tests/integration/config.rs | 2 +- 8 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 786fc62..10dfd32 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -147,7 +147,7 @@ rust_2018_idioms = { level = "warn", priority = -1 } trivial_casts = "warn" unused_lifetimes = "warn" unused_qualifications = "warn" -bad_style = "warn" +bad_style = { level = "warn", priority = -1 } dead_code = "allow" # TODO: "warn" improper_ctypes = "warn" missing_copy_implementations = "warn" diff --git a/src/acl.rs b/src/acl.rs index 127cbf6..aea5c8d 100644 --- a/src/acl.rs +++ b/src/acl.rs @@ -254,8 +254,6 @@ mod tests { use crate::testing::server_config; use rstest::rstest; - use std::env; - #[rstest] fn test_static_acl_access_passes() { let acl = server_config().acl; diff --git a/src/auth.rs b/src/auth.rs index bbb3cec..1c1090e 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -84,7 +84,7 @@ impl FromRequestParts for BasicAuthFromRequest { tracing::debug!(?auth_result, "[AUTH]"); - return match auth_result { + match auth_result { Ok(auth) => { let AuthBasic((user, passw)) = auth; let password = passw.unwrap_or_else(String::new); @@ -107,7 +107,7 @@ impl FromRequestParts for BasicAuthFromRequest { } Err(ApiErrorKind::AuthenticationHeaderError) } - }; + } } } diff --git a/src/commands/auth.rs b/src/commands/auth.rs index f3177a2..c0c315a 100644 --- a/src/commands/auth.rs +++ b/src/commands/auth.rs @@ -132,7 +132,7 @@ fn check(path: &PathBuf) -> Result<()> { { bail!( "Failed to create empty server configuration file: {} due to {}", - &path.to_string_lossy(), + path.to_string_lossy(), err ); }; diff --git a/src/handlers/file_exchange.rs b/src/handlers/file_exchange.rs index 44a5b85..25babac 100644 --- a/src/handlers/file_exchange.rs +++ b/src/handlers/file_exchange.rs @@ -155,7 +155,7 @@ where E: Into, { // Convert the stream into an `AsyncRead`. - let body_with_io_error = stream.map_err(|err| io::Error::new(io::ErrorKind::Other, err)); + let body_with_io_error = stream.map_err(|err| io::Error::other(err)); let body_reader = StreamReader::new(body_with_io_error); pin_mut!(body_reader); let byte_count = match tokio::io::copy(&mut body_reader, &mut write_stream).await { diff --git a/src/handlers/repository.rs b/src/handlers/repository.rs index 15a3ca0..1a006a7 100644 --- a/src/handlers/repository.rs +++ b/src/handlers/repository.rs @@ -47,12 +47,12 @@ pub async fn create_repository( Ok(( StatusCode::OK, - format!("Called create_files with path {:?}", &path), + format!("Called create_files with path {path:?}"), )) } false => Ok(( StatusCode::OK, - format!("Called create_files with path {:?}, create=false", &path), + format!("Called create_files with path {path:?}, create=false"), )), } } diff --git a/src/htpasswd.rs b/src/htpasswd.rs index 5857ebf..5ad128f 100644 --- a/src/htpasswd.rs +++ b/src/htpasswd.rs @@ -137,7 +137,7 @@ impl Htpasswd { )) })?; - for (_n, c) in self.credentials.iter() { + for c in self.credentials.values() { let _e = file.write(c.to_string().as_bytes()).map_err(|err| { ApiErrorKind::WritingToFileFailed(format!( "Could not write to htpasswd file: {} at {:?}", diff --git a/tests/integration/config.rs b/tests/integration/config.rs index 26ebe52..14b9d82 100644 --- a/tests/integration/config.rs +++ b/tests/integration/config.rs @@ -64,7 +64,7 @@ impl ConfigFile { let filename_prefix = app_name.to_string_lossy().to_string(); for n in 0..FILE_CREATE_ATTEMPTS { - let filename = format!("{}-{}.toml", &filename_prefix, n); + let filename = format!("{filename_prefix}-{n}.toml"); let path = env::temp_dir().join(filename); match OpenOptions::new().write(true).create_new(true).open(&path) { From 22bda29272e6afe9b5a74c205ac03b2db14cb601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Fri, 14 Aug 2026 07:22:01 +0000 Subject: [PATCH 07/15] chore(deps)!: replace the unmaintained htpasswd-verify with htauth htpasswd-verify has not been released since 2020 and pulls in rust-crypto, rustc-serialize, time 0.1 and gcc, which accounted for all three RUSTSEC vulnerabilities reported by `cargo audit`. htauth covers the same job with maintained RustCrypto primitives and constant-time comparisons. Behaviour changes: - verification accepts bcrypt, SHA-256/SHA-512 crypt and APR1-MD5; the broken `{SHA}` and `crypt(3)` formats are no longer accepted - an unsupported or malformed hash is logged and rejected instead of panicking, which the old bcrypt path could do - `Credential::new` is fallible now, since hashing can fail - htauth generates its own salt, so the rand dependency is gone `cargo audit` now reports no vulnerabilities. --- Cargo.lock | 456 +++++++----------- Cargo.toml | 3 +- USAGE.md | 7 +- src/auth.rs | 42 +- src/htpasswd.rs | 39 +- ...nfig__test__default_config_passes.snap.new | 22 + ...est__issue_60_parse_config_passes.snap.new | 37 ++ 7 files changed, 290 insertions(+), 316 deletions(-) create mode 100644 src/snapshots/rustic_server__config__test__default_config_passes.snap.new create mode 100644 src/snapshots/rustic_server__config__test__issue_60_parse_config_passes.snap.new diff --git a/Cargo.lock b/Cargo.lock index 2a3f13e..6e255a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -371,12 +371,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "base64" version = "0.22.1" @@ -389,15 +383,22 @@ version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" +[[package]] +name = "base64ct" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" + [[package]] name = "bcrypt" -version = "0.13.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7e7c93a3fb23b2fdde989b2c9ec4dd153063ec81f408507f84c090cd91c6641" +checksum = "9a0f5948f30df5f43ac29d310b7476793be97c50787e6ef4a63d960a0d0be827" dependencies = [ - "base64 0.13.1", - "blowfish 0.9.1", - "getrandom 0.2.17", + "base64 0.22.1", + "blowfish", + "getrandom 0.3.4", + "subtle", "zeroize", ] @@ -407,15 +408,6 @@ version = "2.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - [[package]] name = "block-buffer" version = "0.10.4" @@ -426,14 +418,12 @@ dependencies = [ ] [[package]] -name = "blowfish" -version = "0.7.0" +name = "block-buffer" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32fa6a061124e37baba002e496d203e23ba3d7b73750be82dbfbc92913048a5b" +checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" dependencies = [ - "byteorder", - "cipher 0.2.5", - "opaque-debug", + "hybrid-array", ] [[package]] @@ -443,7 +433,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e412e2cd0f2b2d93e02543ceae7917b3c70331573df19ee046bcbc35e45e87d7" dependencies = [ "byteorder", - "cipher 0.4.4", + "cipher", ] [[package]] @@ -497,17 +487,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" -[[package]] -name = "chacha20" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" -dependencies = [ - "cfg-if", - "cpufeatures 0.3.0", - "rand_core 0.10.1", -] - [[package]] name = "chrono" version = "0.4.45" @@ -522,22 +501,13 @@ dependencies = [ "windows-link", ] -[[package]] -name = "cipher" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" -dependencies = [ - "generic-array", -] - [[package]] name = "cipher" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "crypto-common", + "crypto-common 0.1.7", "inout", ] @@ -582,6 +552,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" +[[package]] +name = "cmov" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a" + [[package]] name = "color-eyre" version = "0.6.5" @@ -669,13 +645,21 @@ dependencies = [ ] [[package]] -name = "crypto-mac" -version = "0.10.0" +name = "crypto-common" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4857fd85a0c34b3c3297875b747c1e02e06b6a0ea32dd892d8192b9ce0813ea6" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" dependencies = [ - "generic-array", - "subtle", + "hybrid-array", +] + +[[package]] +name = "ctutils" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5515a3834141de9eafb9717ad39eea8247b5674e6066c404e8c4b365d2a29e" +dependencies = [ + "cmov", ] [[package]] @@ -692,21 +676,22 @@ checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" [[package]] name = "digest" -version = "0.9.0" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "generic-array", + "block-buffer 0.10.4", + "crypto-common 0.1.7", ] [[package]] name = "digest" -version = "0.10.7" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" dependencies = [ - "block-buffer 0.10.4", - "crypto-common", + "block-buffer 0.12.1", + "crypto-common 0.2.2", ] [[package]] @@ -824,12 +809,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - [[package]] name = "futures" version = "0.3.34" @@ -924,12 +903,6 @@ dependencies = [ "slab", ] -[[package]] -name = "gcc" -version = "0.3.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" - [[package]] name = "generic-array" version = "0.14.7" @@ -948,7 +921,19 @@ checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", "libc", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", ] [[package]] @@ -959,8 +944,7 @@ checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" dependencies = [ "cfg-if", "libc", - "r-efi", - "rand_core 0.10.1", + "r-efi 6.0.0", ] [[package]] @@ -1031,25 +1015,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] -name = "hmac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" -dependencies = [ - "crypto-mac", - "digest 0.9.0", -] - -[[package]] -name = "htpasswd-verify" -version = "0.3.0" +name = "htauth" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23faa152bcd203632071b7d3ea2205fb65dfb39da233bff507c7cd9487e0fcbc" +checksum = "101d320869af09a82a01f2d991633f75577c48c8e467f85e88577092961c7f7a" dependencies = [ - "base64 0.13.1", "bcrypt", - "pwhash", - "rust-crypto", + "getrandom 0.3.4", + "md-5", + "sha-crypt", + "snafu", + "subtle", + "zeroize", ] [[package]] @@ -1097,6 +1074,15 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +[[package]] +name = "hybrid-array" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707114b52a152fa7bdb290cd7cd5912d9467273b6d74e21b8d81aca1f8533f6b" +dependencies = [ + "typenum", +] + [[package]] name = "hyper" version = "1.11.0" @@ -1276,15 +1262,23 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" +[[package]] +name = "mcf" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2044bdbade272ded4a1529324f4f30ca7b0c5b496541f2a9095bbd1c9d03cb06" +dependencies = [ + "base64ct", +] + [[package]] name = "md-5" -version = "0.9.1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "opaque-debug", + "cfg-if", + "digest 0.10.7", ] [[package]] @@ -1315,7 +1309,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427" dependencies = [ "libc", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", "windows-sys 0.61.2", ] @@ -1381,12 +1375,6 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - [[package]] name = "owo-colors" version = "4.3.0" @@ -1416,6 +1404,16 @@ dependencies = [ "windows-link", ] +[[package]] +name = "password-hash" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aab41826031698d6ffcd9cff78ef56ef998e39dc7e5067cdfebe373842d4723b" +dependencies = [ + "getrandom 0.4.3", + "phc", +] + [[package]] name = "percent-encoding" version = "2.3.2" @@ -1464,6 +1462,17 @@ dependencies = [ "pest", ] +[[package]] +name = "phc" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44dc769b75f93afdddd8c7fa12d685292ddeff1e66f7f0f3a234cf1818afe892" +dependencies = [ + "base64ct", + "ctutils", + "getrandom 0.4.3", +] + [[package]] name = "pin-project" version = "1.1.13" @@ -1490,15 +1499,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" -[[package]] -name = "ppv-lite86" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -dependencies = [ - "zerocopy", -] - [[package]] name = "predicates" version = "3.1.4" @@ -1579,21 +1579,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "pwhash" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "419a3ad8fa9f9d445e69d9b185a24878ae6e6f55c96e4512f4a0e28cd3bc5c56" -dependencies = [ - "blowfish 0.7.0", - "byteorder", - "hmac", - "md-5", - "rand 0.8.7", - "sha-1", - "sha2", -] - [[package]] name = "quote" version = "1.0.47" @@ -1605,103 +1590,15 @@ dependencies = [ [[package]] name = "r-efi" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" - -[[package]] -name = "rand" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" -dependencies = [ - "libc", - "rand 0.4.6", -] - -[[package]] -name = "rand" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -dependencies = [ - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "rdrand", - "winapi", -] - -[[package]] -name = "rand" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22f6172bdec972074665ed81ed53b71da00bfc44b65a753cfde883ec4c702a1a" -dependencies = [ - "libc", - "rand_chacha", - "rand_core 0.6.4", -] - -[[package]] -name = "rand" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" -dependencies = [ - "chacha20", - "getrandom 0.4.3", - "rand_core 0.10.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -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.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.17", -] - -[[package]] -name = "rand_core" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" - -[[package]] -name = "rdrand" -version = "0.4.0" +name = "r-efi" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", -] +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] name = "redox_syscall" @@ -1790,31 +1687,12 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "rust-crypto" -version = "0.2.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a" -dependencies = [ - "gcc", - "libc", - "rand 0.3.23", - "rustc-serialize", - "time", -] - [[package]] name = "rustc-demangle" version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b74b56ffa8bb2830709a538c2cbcae9aa062db0d2a42563bfb09bdaae44020eb" -[[package]] -name = "rustc-serialize" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe834bc780604f4674073badbad26d7219cadfb4a2275802db12cbae17498401" - [[package]] name = "rustc_version" version = "0.4.1" @@ -1846,12 +1724,11 @@ dependencies = [ "displaydoc", "futures", "futures-util", - "htpasswd-verify", + "htauth", "http-body-util", "insta", "predicates", "pretty_assertions", - "rand 0.10.2", "rstest", "rustls", "serde", @@ -2080,16 +1957,16 @@ dependencies = [ ] [[package]] -name = "sha-1" -version = "0.9.8" +name = "sha-crypt" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" +checksum = "32ee31e0190f9dc366d26b032ac36a99328532f40a237a79385a20d2d7f29810" dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures 0.2.17", - "digest 0.9.0", - "opaque-debug", + "base64ct", + "ctutils", + "mcf", + "password-hash", + "sha2", ] [[package]] @@ -2105,15 +1982,13 @@ dependencies = [ [[package]] name = "sha2" -version = "0.9.9" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" dependencies = [ - "block-buffer 0.9.0", "cfg-if", - "cpufeatures 0.2.17", - "digest 0.9.0", - "opaque-debug", + "cpufeatures 0.3.0", + "digest 0.11.3", ] [[package]] @@ -2159,6 +2034,27 @@ version = "1.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" +[[package]] +name = "snafu" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e84b3f4eacbf3a1ce05eac6763b4d629d60cbc94d632e4092c54ade71f1e1a2" +dependencies = [ + "snafu-derive", +] + +[[package]] +name = "snafu-derive" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1c97747dbf44bb1ca44a561ece23508e99cb592e862f22222dcf42f51d1e451" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "socket2" version = "0.6.5" @@ -2314,17 +2210,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - [[package]] name = "tokio" version = "1.53.1" @@ -2628,15 +2513,18 @@ dependencies = [ [[package]] name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] -name = "wasi" -version = "0.11.1+wasi-snapshot-preview1" +name = "wasip2" +version = "1.0.4+wasi-0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] [[package]] name = "wasm-bindgen" @@ -2871,30 +2759,16 @@ dependencies = [ ] [[package]] -name = "yansi" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" - -[[package]] -name = "zerocopy" -version = "0.8.56" +name = "wit-bindgen" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556764e583adb45a9f8d413c2a147fa7e8d821e48e12b14fd560b607998b75eb" -dependencies = [ - "zerocopy-derive", -] +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" [[package]] -name = "zerocopy-derive" -version = "0.8.56" +name = "yansi" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ab42fc20575779bd240faa45f94a74256f755c0fa9e89f0ede20d91d0cdfc1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "zeroize" diff --git a/Cargo.toml b/Cargo.toml index 10dfd32..3681c00 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,9 +54,8 @@ displaydoc = "0.2" # enum_dispatch = "0.3.12" futures = "0.3" futures-util = "0.3" -htpasswd-verify = "0.3" +htauth = "0.1.2" http-body-util = "0.1" -rand = "0.10" serde = { version = "1", default-features = false, features = ["derive"] } serde_derive = "1" strum = { version = "0.28", features = ["derive"] } diff --git a/USAGE.md b/USAGE.md index fd21e05..ea83327 100644 --- a/USAGE.md +++ b/USAGE.md @@ -31,9 +31,10 @@ using a `.htpasswd` file to specify users. By default, the server looks for this file at the root of the persistence directory, but this can be changed using the `--htpasswd-file` option. You can create such a file by executing the following command (note that you need the `htpasswd` program from Apache's http-tools). In -order to append new user to the file, just omit the `-c` argument. Only bcrypt -and SHA encryption methods are supported, so use -B (very secure) or -s -(insecure by today's standards) when adding/changing passwords. +order to append new user to the file, just omit the `-c` argument. The supported +hashing methods are bcrypt (`-B`), SHA-256 crypt (`-2`), SHA-512 crypt (`-5`) +and APR1-MD5 (`-m`). Use `-B` unless you have a reason not to; the SHA1 (`-s`) +and `crypt(3)` (`-d`) methods are broken and are not accepted. ```sh htpasswd -B -c .htpasswd username diff --git a/src/auth.rs b/src/auth.rs index 1c1090e..5428449 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -1,4 +1,4 @@ -use std::{borrow::Borrow, path::PathBuf}; +use std::path::PathBuf; use abscissa_core::SecretString; use axum::{extract::FromRequestParts, http::request::Parts}; @@ -58,7 +58,23 @@ impl Auth { let user = user.into(); let passwd = passwd.into(); - self.users.as_ref().map_or(true, |users| matches!(users.get(&user), Some(passwd_data) if htpasswd_verify::Htpasswd::from(passwd_data.to_string().borrow()).check(user, passwd))) + let Some(users) = self.users.as_ref() else { + return true; + }; + + let Some(credential) = users.get(&user) else { + return false; + }; + + match htauth::verify_password(&passwd, credential.hash()) { + Ok(verified) => verified, + Err(err) => { + // An unsupported or malformed hash must never authenticate the + // user, but it is worth telling the operator about it. + tracing::warn!(%user, %err, "[AUTH] could not verify the stored hash"); + false + } + } } pub const fn is_disabled(&self) -> bool { @@ -115,6 +131,7 @@ impl FromRequestParts for BasicAuthFromRequest { mod test { use super::*; + use crate::htpasswd::Credential; use crate::testing::{basic_auth_header_value, init_test_environment, server_config}; use anyhow::Result; @@ -142,6 +159,27 @@ mod test { Ok(()) } + /// Hashes we cannot verify must be rejected, never accepted. + /// + /// `{SHA}` and the DES based `crypt(3)` are no longer supported, and a + /// truncated hash cannot be verified either. + #[rstest] + #[case("{SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g=")] + #[case("aWmMhCH/tzWEg")] + #[case("$apr1$truncated")] + #[case("")] + fn test_unverifiable_hash_is_rejected(#[case] hash: &str) { + let mut credentials = CredentialMap::new(); + let _ = credentials.insert( + "rustic".to_string(), + Credential::from_line(format!("rustic:{hash}")).unwrap(), + ); + + let auth = Auth::from(credentials); + + assert!(!auth.verify("rustic", "password")); + } + #[rstest] fn test_auth_from_file_passes(auth: Auth) { init_auth(auth).unwrap(); diff --git a/src/htpasswd.rs b/src/htpasswd.rs index 5ad128f..3bcd3a1 100644 --- a/src/htpasswd.rs +++ b/src/htpasswd.rs @@ -6,15 +6,17 @@ use std::{ path::PathBuf, }; -use htpasswd_verify::md5::{format_hash, md5_apr1_encode}; -use rand::{distr::Alphanumeric, rng, RngExt}; +use htauth::{hash_password, HashAlgorithm}; use serde::Serialize; use crate::error::{ApiErrorKind, ApiResult, AppResult, ErrorKind}; -pub mod constants { - pub(super) const SALT_LEN: usize = 8; -} +/// Algorithm used for credentials created by us. +/// +/// `APR1-MD5` is what Apache's `htpasswd` produces by default and what this +/// server has always written, so we keep it for compatibility. Verification is +/// not restricted to it: any algorithm [`htauth`] understands is accepted. +const HASH_ALGORITHM: HashAlgorithm = HashAlgorithm::Apr1Md5; #[derive(Clone, Debug, Default, Serialize)] pub struct CredentialMap(BTreeMap); @@ -81,7 +83,7 @@ impl Htpasswd { } pub fn create(&mut self, name: &str, pass: &str) -> AppResult<()> { - let cred = Credential::new(name, pass); + let cred = Credential::new(name, pass)?; self.insert(cred)?; @@ -93,7 +95,7 @@ impl Htpasswd { } pub fn update(&mut self, name: &str, pass: &str) -> AppResult<()> { - let cred = Credential::new(name, pass); + let cred = Credential::new(name, pass)?; let _ = self .credentials @@ -156,19 +158,20 @@ pub struct Credential { } impl Credential { - pub fn new(name: &str, pass: &str) -> Self { - let salt: String = rng() - .sample_iter(Alphanumeric) - .take(constants::SALT_LEN) - .map(char::from) - .collect(); - let hash = md5_apr1_encode(pass, salt.as_str()); - let hash = format_hash(hash.as_str(), salt.as_str()); - - Self { + pub fn new(name: &str, pass: &str) -> AppResult { + let hash = hash_password(pass, HASH_ALGORITHM).map_err(|err| { + ErrorKind::Io.context(format!("Could not hash the password for `{name}`: {err}")) + })?; + + Ok(Self { name: name.into(), hash, - } + }) + } + + /// The stored password hash in htpasswd format + pub(crate) fn hash(&self) -> &str { + &self.hash } /// Returns a credential struct from a htpasswd file line diff --git a/src/snapshots/rustic_server__config__test__default_config_passes.snap.new b/src/snapshots/rustic_server__config__test__default_config_passes.snap.new new file mode 100644 index 0000000..1922d33 --- /dev/null +++ b/src/snapshots/rustic_server__config__test__default_config_passes.snap.new @@ -0,0 +1,22 @@ +--- +source: src/config.rs +assertion_line: 374 +expression: config +--- +[server] +listen = '127.0.0.1:8000' + +[storage] +data-dir = '/tmp/rustic' + +[auth] +disable-auth = false + +[acl] +disable-acl = false +append-only = true + +[tls] +disable-tls = true + +[log] diff --git a/src/snapshots/rustic_server__config__test__issue_60_parse_config_passes.snap.new b/src/snapshots/rustic_server__config__test__issue_60_parse_config_passes.snap.new new file mode 100644 index 0000000..0b561c3 --- /dev/null +++ b/src/snapshots/rustic_server__config__test__issue_60_parse_config_passes.snap.new @@ -0,0 +1,37 @@ +--- +source: src/config.rs +assertion_line: 443 +expression: config +--- +RusticServerConfig { + server: ConnectionSettings { + listen: Some( + 127.0.0.1:8000, + ), + }, + storage: StorageSettings { + data_dir: Some( + "/tmp/rustic", + ), + quota: None, + }, + auth: HtpasswdSettings { + disable_auth: false, + htpasswd_file: None, + }, + acl: AclSettings { + disable_acl: true, + private_repos: true, + append_only: false, + acl_path: None, + }, + tls: TlsSettings { + disable_tls: true, + tls_key: None, + tls_cert: None, + }, + log: LogSettings { + log_level: None, + log_file: None, + }, +} From ca2000a1ff1bf14e7cadaa408bf16e7fb5b8a7c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Fri, 14 Aug 2026 07:25:22 +0000 Subject: [PATCH 08/15] chore: raise the minimum supported Rust version to 1.88 The updated dependencies require it: htauth needs 1.88 and abscissa 0.9, axum 0.8, clap 4.6 and uuid 1.24 all need 1.85. Verified with a 1.88.0 toolchain. Note that `cargo test` needs a newer toolchain than that, because serial_test 4 declares 1.93.1; building the crate itself does not. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 3681c00..589cb4f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ include = [ keywords = ["backup", "restic", "cli", "server"] license = "AGPL-3.0-or-later" repository = "https://github.com/rustic-rs/rustic_server" -rust-version = "1.74.0" +rust-version = "1.88.0" description = """ rustic server - a REST server built in rust to use with rustic and restic. """ From 14e327a56a3bb2dc51c7cbdedce5508d1e432088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Fri, 14 Aug 2026 07:26:19 +0000 Subject: [PATCH 09/15] chore: drop the stale RUSTSEC-2023-0071 exception The rsa crate is no longer in the dependency tree, so the ignore has no effect other than hiding a future regression. --- deny.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/deny.toml b/deny.toml index df949b0..4e2101c 100644 --- a/deny.toml +++ b/deny.toml @@ -70,9 +70,6 @@ feature-depth = 1 # A list of advisory IDs to ignore. Note that ignored advisories will still # output a note when they are encountered. ignore = [ - # FIXME!: See https://github.com/RustCrypto/RSA/issues/19#issuecomment-1822995643. - # There is no workaround available yet. - "RUSTSEC-2023-0071", # { id = "RUSTSEC-0000-0000", reason = "you can specify a reason the advisory is ignored" }, # "a-crate-that-is-yanked@0.1.1", # you can also ignore yanked crate versions if you wish # { crate = "a-crate-that-is-yanked@0.1.1", reason = "you can specify why you are ignoring the yanked crate" }, From ba5c979ea74bed640771e3ff010af7245e9a3769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Fri, 14 Aug 2026 07:28:14 +0000 Subject: [PATCH 10/15] chore: allow our own license in the cargo-deny configuration cargo-deny checks the license of the crate under inspection too, so `check licenses` rejected rustic_server itself for being AGPL-3.0-or-later. No dependency license was involved. --- deny.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deny.toml b/deny.toml index 4e2101c..11d47de 100644 --- a/deny.toml +++ b/deny.toml @@ -88,6 +88,8 @@ ignore = [ # See https://spdx.org/licenses/ for list of possible licenses # [possible values: any SPDX 3.11 short identifier (+ optional exception)]. allow = [ + # Our own license + "AGPL-3.0-or-later", "MIT", "Apache-2.0", "Apache-2.0 WITH LLVM-exception", From 2596468c0998303fe42c64ebab17bee4ba630181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Fri, 14 Aug 2026 07:37:19 +0000 Subject: [PATCH 11/15] chore!: migrate to the 2024 edition Compiles clean on rustc 1.97.1 with no edition compatibility warnings left in our own code. Two changes were needed: - `check_auth_and_acl` and `check_name` returned `impl IntoResponse` while taking a reference argument. In edition 2024 the opaque type captures every lifetime in scope, so both now take a named type parameter and declare `use` to capture nothing else. Neither actually borrows: they return `StatusCode` and `()`. - Three sites triggered the tail expression drop order lint from inside a `tracing::debug!` expansion. The temporaries only own memory, so the order was harmless, but binding them first removes the warning and drops a duplicated `repo()`/`join()` call in each case. The edition also implies resolver 3 and rustfmt style edition 2024. --- Cargo.toml | 2 +- src/handlers/access_check.rs | 10 ++++++---- src/handlers/file_exchange.rs | 17 ++++++++++------- src/handlers/repository.rs | 18 +++++++----------- src/storage.rs | 12 +++++------- 5 files changed, 29 insertions(+), 30 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 589cb4f..01c3f39 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "rustic_server" version = "0.4.4" authors = ["the rustic-rs team"] categories = ["command-line-utilities"] -edition = "2021" +edition = "2024" homepage = "https://rustic.cli.rs/" include = [ "src/**/*", diff --git a/src/handlers/access_check.rs b/src/handlers/access_check.rs index 13ebc80..e2ef5c3 100644 --- a/src/handlers/access_check.rs +++ b/src/handlers/access_check.rs @@ -7,17 +7,19 @@ use tracing::debug; use strum::VariantNames; use crate::{ - acl::{AccessType, AclChecker, ACL}, + acl::{ACL, AccessType, AclChecker}, error::{ApiErrorKind, ApiResult}, typed_path::TpeKind, }; -pub fn check_auth_and_acl( +pub fn check_auth_and_acl>>( user: String, - tpe: impl Into>, + tpe: T, path: &Path, access_type: AccessType, -) -> ApiResult { + // `use` keeps the response from capturing the lifetime of `path`, which + // edition 2024 would otherwise do implicitly. +) -> ApiResult> { let tpe = tpe.into(); // don't allow paths that includes any of the defined types diff --git a/src/handlers/file_exchange.rs b/src/handlers/file_exchange.rs index 25babac..dfc621e 100644 --- a/src/handlers/file_exchange.rs +++ b/src/handlers/file_exchange.rs @@ -4,8 +4,8 @@ use std::{ result::Result, }; -use axum::{body::Bytes, extract::Request, http::StatusCode, response::IntoResponse, BoxError}; -use axum_extra::{headers::Range, TypedHeader}; +use axum::{BoxError, body::Bytes, extract::Request, http::StatusCode, response::IntoResponse}; +use axum_extra::{TypedHeader, headers::Range}; use axum_range::{KnownSize, Ranged}; use futures::{Stream, TryStreamExt}; use futures_util::pin_mut; @@ -187,10 +187,12 @@ fn check_string_sha256(name: &str) -> bool { true } -pub fn check_name( - tpe: impl Into>, +pub fn check_name>>( + tpe: T, name: Option<&str>, -) -> ApiResult { + // `use` keeps the response from capturing the lifetime of `name`, which + // edition 2024 would otherwise do implicitly. +) -> ApiResult> { let tpe = tpe.into(); match (tpe, name) { @@ -216,9 +218,10 @@ mod test { use std::{fs, path::PathBuf}; use axum::{ + Router, body::Body, - http::{header, Method, Request, StatusCode}, - middleware, Router, + http::{Method, Request, StatusCode, header}, + middleware, }; use axum_extra::routing::RouterExt; // for `Router::typed_*` use http_body_util::BodyExt; diff --git a/src/handlers/repository.rs b/src/handlers/repository.rs index 1a006a7..b771edd 100644 --- a/src/handlers/repository.rs +++ b/src/handlers/repository.rs @@ -25,11 +25,9 @@ pub async fn create_repository( auth: BasicAuthFromRequest, Query(params): Query, ) -> ApiResult { - tracing::debug!( - "[create_repository] repository path: {}", - path.repo().unwrap() - ); - let path = PathBuf::new().join(path.repo().unwrap()); + let repo = path.repo().unwrap(); + tracing::debug!("[create_repository] repository path: {repo}"); + let path = PathBuf::new().join(repo); let _ = check_auth_and_acl(auth.user, None, &path, AccessType::Append)?; let storage = STORAGE.get().unwrap(); @@ -64,11 +62,9 @@ pub async fn delete_repository( path: P, auth: BasicAuthFromRequest, ) -> ApiResult { - tracing::debug!( - "[delete_repository] repository path: {}", - &path.repo().unwrap() - ); - let path = PathBuf::new().join(path.repo().unwrap()); + let repo = path.repo().unwrap(); + tracing::debug!("[delete_repository] repository path: {repo}"); + let path = PathBuf::new().join(repo); let _ = check_auth_and_acl(auth.user, None, &path, AccessType::Modify)?; let storage = STORAGE.get().unwrap(); @@ -87,11 +83,11 @@ mod test { testing::server_config, }; use axum::http::Method; + use axum::{Router, middleware}; use axum::{ body::Body, http::{Request, StatusCode}, }; - use axum::{middleware, Router}; use axum_extra::routing::RouterExt; use pretty_assertions::assert_eq; use std::path::PathBuf; diff --git a/src/storage.rs b/src/storage.rs index a94522d..c5bb3b4 100644 --- a/src/storage.rs +++ b/src/storage.rs @@ -3,7 +3,7 @@ use std::{ sync::{Arc, OnceLock}, }; -use tokio::fs::{create_dir_all, remove_dir_all, remove_file, File}; +use tokio::fs::{File, create_dir_all, remove_dir_all, remove_file}; use walkdir::WalkDir; use crate::{ @@ -163,11 +163,9 @@ impl Storage for LocalStorage { } async fn remove_repository(&self, path: &Path) -> ApiResult<()> { - tracing::debug!( - "Deleting repository: {}", - self.path.join(path).to_string_lossy() - ); - remove_dir_all(self.path.join(path)).await.map_err(|err| { + let repo_path = self.path.join(path); + tracing::debug!("Deleting repository: {}", repo_path.to_string_lossy()); + remove_dir_all(&repo_path).await.map_err(|err| { ApiErrorKind::RemovingRepositoryFailed(format!("Could not remove repository: {err}")) }) } @@ -175,7 +173,7 @@ impl Storage for LocalStorage { #[cfg(test)] mod test { - use crate::storage::{init_storage, LocalStorage, Storage, STORAGE}; + use crate::storage::{LocalStorage, STORAGE, Storage, init_storage}; use std::path::PathBuf; #[test] From c99ed9864cf5d4546791bd4e49c279b9972fccc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Fri, 14 Aug 2026 07:37:26 +0000 Subject: [PATCH 12/15] style: apply the rustfmt 2024 style edition Mechanical reordering of use statements: the 2024 style edition sorts uppercase-first and splits nested groups differently. No code changes. --- src/application.rs | 3 ++- src/auth.rs | 2 +- src/commands.rs | 4 ++-- src/commands/auth.rs | 4 ++-- src/commands/serve.rs | 2 +- src/context.rs | 8 +++++--- src/handlers/file_config.rs | 5 +++-- src/handlers/file_length.rs | 5 +++-- src/handlers/files_list.rs | 11 ++++++----- src/htpasswd.rs | 4 ++-- src/testing.rs | 8 ++++---- src/web.rs | 4 ++-- 12 files changed, 33 insertions(+), 27 deletions(-) diff --git a/src/application.rs b/src/application.rs index 17c9861..4c1ebc6 100644 --- a/src/application.rs +++ b/src/application.rs @@ -4,10 +4,11 @@ use crate::{commands::EntryPoint, config::RusticServerConfig}; use abscissa_core::Config; use abscissa_core::FrameworkErrorKind::IoError; use abscissa_core::{ + Application, FrameworkError, StandardPaths, application::{self, AppCell}, config::{self, CfgCell}, path::AbsPathBuf, - trace, Application, FrameworkError, StandardPaths, + trace, }; use abscissa_tokio::TokioComponent; use std::path::Path; diff --git a/src/auth.rs b/src/auth.rs index 5428449..5eec306 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -136,10 +136,10 @@ mod test { use anyhow::Result; use axum::{ + Router, body::Body, http::{Method, Request, StatusCode}, routing::get, - Router, }; use http_body_util::BodyExt; use rstest::{fixture, rstest}; diff --git a/src/commands.rs b/src/commands.rs index cac8f44..22ce706 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -18,11 +18,11 @@ use crate::{ config::RusticServerConfig, }; use abscissa_core::{ - config::Override, tracing::info, Command, Configurable, FrameworkError, Runnable, + Command, Configurable, FrameworkError, Runnable, config::Override, tracing::info, }; use clap::builder::{ - styling::{AnsiColor, Effects}, Styles, + styling::{AnsiColor, Effects}, }; use std::path::PathBuf; diff --git a/src/commands/auth.rs b/src/commands/auth.rs index c0c315a..e729998 100644 --- a/src/commands/auth.rs +++ b/src/commands/auth.rs @@ -2,8 +2,8 @@ use std::path::PathBuf; -use abscissa_core::{status_err, Application, Command, Runnable, Shutdown}; -use anyhow::{bail, Result}; +use abscissa_core::{Application, Command, Runnable, Shutdown, status_err}; +use anyhow::{Result, bail}; use clap::{Args, Parser, Subcommand}; use crate::{htpasswd::Htpasswd, prelude::RUSTIC_SERVER_APP}; diff --git a/src/commands/serve.rs b/src/commands/serve.rs index 7498462..296690a 100644 --- a/src/commands/serve.rs +++ b/src/commands/serve.rs @@ -1,10 +1,10 @@ //! `serve` subcommand use abscissa_core::{ + Application, Command, FrameworkError, Runnable, Shutdown, config::Override, status_err, tracing::{debug, info}, - Application, Command, FrameworkError, Runnable, Shutdown, }; use anyhow::Result; use clap::Parser; diff --git a/src/context.rs b/src/context.rs index fca6c7b..fea33df 100644 --- a/src/context.rs +++ b/src/context.rs @@ -13,8 +13,8 @@ use crate::{ acl::Acl, auth::Auth, config::{ - default_data_dir, default_socket_address, AclSettings, HtpasswdSettings, LogSettings, - RusticServerConfig, TlsSettings, + AclSettings, HtpasswdSettings, LogSettings, RusticServerConfig, TlsSettings, + default_data_dir, default_socket_address, }, error::{AppResult, ErrorKind}, storage::Storage, @@ -119,7 +119,9 @@ where fn auth(htpasswd_settings: HtpasswdSettings, data_dir: PathBuf) -> AppResult { let auth = if htpasswd_settings.is_disabled() { info!("Authentication is disabled."); - warn!("This allows anyone to push to your repositories. This should be considered insecure and is not recommended for production use."); + warn!( + "This allows anyone to push to your repositories. This should be considered insecure and is not recommended for production use." + ); Auth::default() } else { info!( diff --git a/src/handlers/file_config.rs b/src/handlers/file_config.rs index 0eb0ece..311a430 100644 --- a/src/handlers/file_config.rs +++ b/src/handlers/file_config.rs @@ -1,7 +1,7 @@ use std::path::{Path, PathBuf}; use axum::{extract::Request, http::header, response::IntoResponse}; -use axum_extra::{headers::Range, TypedHeader}; +use axum_extra::{TypedHeader, headers::Range}; use axum_macros::debug_handler; use axum_range::{KnownSize, Ranged}; @@ -139,9 +139,10 @@ mod test { use std::{fs, path::PathBuf}; use axum::{ + Router, body::Body, http::{Method, Request, StatusCode}, - middleware, Router, + middleware, }; use axum_extra::routing::RouterExt; // for `Router::typed_*` use http_body_util::BodyExt; diff --git a/src/handlers/file_length.rs b/src/handlers/file_length.rs index 3d23d10..8e9e586 100644 --- a/src/handlers/file_length.rs +++ b/src/handlers/file_length.rs @@ -68,8 +68,9 @@ pub async fn file_length( #[cfg(test)] mod test { use axum::{ - http::{header, Method, StatusCode}, - middleware, Router, + Router, + http::{Method, StatusCode, header}, + middleware, }; use axum_extra::routing::RouterExt; // for `Router::typed_*` use http_body_util::BodyExt; diff --git a/src/handlers/files_list.rs b/src/handlers/files_list.rs index 0aa2888..97c7ea5 100644 --- a/src/handlers/files_list.rs +++ b/src/handlers/files_list.rs @@ -1,12 +1,12 @@ use std::{path::Path, str::FromStr}; use axum::{ + Json, http::{ - header::{self, AUTHORIZATION}, StatusCode, + header::{self, AUTHORIZATION}, }, response::IntoResponse, - Json, }; use axum_extra::headers::HeaderMap; use serde_derive::{Deserialize, Serialize}; @@ -144,19 +144,20 @@ pub async fn list_files( #[cfg(test)] mod test { use axum::{ + Router, body::Body, http::{ - header::{ACCEPT, CONTENT_TYPE}, Request, StatusCode, + header::{ACCEPT, CONTENT_TYPE}, }, - middleware, Router, + middleware, }; use axum_extra::routing::RouterExt; // for `Router::typed_*` use http_body_util::BodyExt; use tower::ServiceExt; // for `call`, `oneshot`, and `ready` use crate::{ - handlers::files_list::{list_files, ApiVersionKind, RepoPathEntry}, + handlers::files_list::{ApiVersionKind, RepoPathEntry, list_files}, log::print_request_response, testing::{basic_auth_header_value, init_test_environment, server_config}, typed_path::RepositoryTpePath, diff --git a/src/htpasswd.rs b/src/htpasswd.rs index 3bcd3a1..b8bd640 100644 --- a/src/htpasswd.rs +++ b/src/htpasswd.rs @@ -1,12 +1,12 @@ use std::{ - collections::{btree_map::Entry, BTreeMap}, + collections::{BTreeMap, btree_map::Entry}, fmt::{Display, Formatter}, fs::{self, read_to_string}, io::Write, path::PathBuf, }; -use htauth::{hash_password, HashAlgorithm}; +use htauth::{HashAlgorithm, hash_password}; use serde::Serialize; use crate::error::{ApiErrorKind, ApiResult, AppResult, ErrorKind}; diff --git a/src/testing.rs b/src/testing.rs index 2421c6e..5fdc845 100644 --- a/src/testing.rs +++ b/src/testing.rs @@ -12,12 +12,12 @@ use tracing::debug; use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; use crate::{ - acl::{init_acl, Acl}, - auth::{init_auth, Auth}, + acl::{Acl, init_acl}, + auth::{Auth, init_auth}, config::{ - default_data_dir, AclSettings, HtpasswdSettings, RusticServerConfig, StorageSettings, + AclSettings, HtpasswdSettings, RusticServerConfig, StorageSettings, default_data_dir, }, - storage::{init_storage, LocalStorage, Storage}, + storage::{LocalStorage, Storage, init_storage}, }; // ------------------------------------------------ diff --git a/src/web.rs b/src/web.rs index da0753b..6e01362 100644 --- a/src/web.rs +++ b/src/web.rs @@ -1,4 +1,4 @@ -use axum::{middleware, routing::get, Router}; +use axum::{Router, middleware, routing::get}; use axum_extra::routing::RouterExt; use axum_server::tls_rustls::RustlsConfig; use tokio::net::TcpListener; @@ -18,7 +18,7 @@ use crate::{ repository::{create_repository, delete_repository}, }, log::print_request_response, - storage::{init_storage, Storage}, + storage::{Storage, init_storage}, typed_path::{RepositoryConfigPath, RepositoryPath, RepositoryTpeNamePath, RepositoryTpePath}, }; From b5b115a66b123e26af8624b05dd000c3aeffe53c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Fri, 14 Aug 2026 08:06:58 +0000 Subject: [PATCH 13/15] fix: stop buffering request and response bodies in the log middleware `print_request_response` ran `body.collect()` on both the request and the response, so every upload and download was held in memory in full before being forwarded. Worse, `web.rs` installed the middleware at INFO, which is the default level, while the middleware itself only emits `debug!` records: by default the server buffered every body and then logged nothing. Bodies here are pack, index and key files, so the buffer was also scanned by `str::from_utf8` on every request just to discover it is not text. Measured with restic pushing 6 cycles of 120 MB through one server process, resident memory after each cycle: before 101 -> 184 -> 203 -> 190 -> 152 -> 196 MB, 222 MB when idle after 11 -> 13 -> 14 -> 13 -> 14 -> 13 MB, 14 MB when idle The middleware now logs method, URI, status and headers and passes the body through untouched, and it is only installed at DEBUG or TRACE. Uploads also stream to disk end to end now, which halved the backup wall time in the same test. Also drop a `Box::leak` of the ACL file contents. `RepoAcl` owns its data, so the `'static` borrow was never needed; it leaked the file on every startup. --- src/acl.rs | 5 +---- src/log.rs | 65 +++++++++++++----------------------------------------- src/web.rs | 4 +++- 3 files changed, 19 insertions(+), 55 deletions(-) diff --git a/src/acl.rs b/src/acl.rs index aea5c8d..7d9c297 100644 --- a/src/acl.rs +++ b/src/acl.rs @@ -107,10 +107,7 @@ fn read_toml(file_path: &PathBuf) -> AppResult> { err, file_path )) })?; - // make the contents static in memory - let s = Box::leak(s.into_boxed_str()); - - let mut repos: BTreeMap = toml::from_str(s) + let mut repos: BTreeMap = toml::from_str(&s) .map_err(|err| ErrorKind::Config.context(format!("Could not parse TOML: {}", err)))?; // copy key "default" into "" diff --git a/src/log.rs b/src/log.rs index 4c15e1f..eeba80b 100644 --- a/src/log.rs +++ b/src/log.rs @@ -1,71 +1,36 @@ -use axum::{ - body::{Body, Bytes}, - extract::Request, - middleware::Next, - response::{IntoResponse, Response}, -}; -use http_body_util::BodyExt; - -use crate::error::ApiErrorKind; +use axum::{extract::Request, middleware::Next, response::Response}; // Add the `#[debug_middleware]` attribute to the function to make debugging easier. // use axum_macros::debug_middleware; // // #[debug_middleware] /// Router middleware function to print additional information on the request and response. -pub async fn print_request_response( - req: Request, - next: Next, -) -> Result { - let (parts, body) = req.into_parts(); +/// +/// # Note +/// +/// Request and response bodies are deliberately *not* logged. They carry pack, +/// index and key files, which are encrypted blobs of arbitrary size, so logging +/// them would mean holding a whole file in memory for every request in flight +/// only to find out it is not printable text. +pub async fn print_request_response(req: Request, next: Next) -> Response { let uuid = uuid::Uuid::new_v4(); tracing::debug!( id = %uuid, - method = %parts.method, - uri = %parts.uri, + method = %req.method(), + uri = %req.uri(), + headers = ?req.headers(), "[REQUEST]", ); - tracing::debug!(id = %uuid, headers = ?parts.headers, "[HEADERS]"); - - let bytes = buffer_and_print(&uuid, body).await?; - - let req = Request::from_parts(parts, Body::from(bytes)); - let res = next.run(req).await; - let (parts, body) = res.into_parts(); tracing::debug!( id = %uuid, - headers = ?parts.headers, - status = %parts.status, + status = %res.status(), + headers = ?res.headers(), "[RESPONSE]", ); - let bytes = buffer_and_print(&uuid, body).await?; - let res = Response::from_parts(parts, Body::from(bytes)); - - Ok(res) -} - -async fn buffer_and_print(uuid: &uuid::Uuid, body: B) -> Result -where - B: axum::body::HttpBody + Send, - B::Error: std::fmt::Display, -{ - let bytes = match body.collect().await { - Ok(collected) => collected.to_bytes(), - Err(err) => { - return Err(ApiErrorKind::BadRequest(format!( - "failed to read body: {err}" - ))); - } - }; - - if let Ok(body) = std::str::from_utf8(&bytes) { - tracing::debug!(id = %uuid, body = %body, "[BODY]"); - } - - Ok(bytes) + res } diff --git a/src/web.rs b/src/web.rs index 6e01362..23cb520 100644 --- a/src/web.rs +++ b/src/web.rs @@ -175,8 +175,10 @@ where // TODO: Use LogSettings here, this should be set from the cli by `--log` // TODO: and then needs to go to a file // e.g. log_opts.is_disabled() or other checks + // The middleware only emits `debug!` records, so installing it at a coarser + // level would cost a UUID per request and print nothing. match LevelFilter::current() { - LevelFilter::TRACE | LevelFilter::DEBUG | LevelFilter::INFO => { + LevelFilter::TRACE | LevelFilter::DEBUG => { app = app.layer(middleware::from_fn(print_request_response)); } _ => {} From 9f76240c9ddf7f4da36bf60a47def64b36f23ad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Fri, 14 Aug 2026 08:21:08 +0000 Subject: [PATCH 14/15] fix: stop reflecting the client's Authorization header into the listing response `list_files` copied the request's `Authorization` header into its own response. That served no purpose and sent the client's Basic credentials back out, where any proxy or cache on the path could record them. Reading the header also assumed it was always present. It is not: with `--no-auth` the extractor accepts a request that carries no credentials, so `headers.get(AUTHORIZATION).unwrap()` panicked. Because the release profile sets `panic = "abort"`, that killed the whole server rather than failing the one request, making a single unauthenticated GET enough to stop the service: GET /{repo}/{tpe}/ without an Authorization header -> thread panicked at src/handlers/files_list.rs:139 -> Aborted (core dumped) --- src/handlers/files_list.rs | 44 ++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/src/handlers/files_list.rs b/src/handlers/files_list.rs index 97c7ea5..b3cf543 100644 --- a/src/handlers/files_list.rs +++ b/src/handlers/files_list.rs @@ -1,13 +1,6 @@ use std::{path::Path, str::FromStr}; -use axum::{ - Json, - http::{ - StatusCode, - header::{self, AUTHORIZATION}, - }, - response::IntoResponse, -}; +use axum::{Json, http::StatusCode, http::header, response::IntoResponse}; use axum_extra::headers::HeaderMap; use serde_derive::{Deserialize, Serialize}; @@ -83,7 +76,7 @@ pub async fn list_files( let read_dir = storage.read_dir(path, tpe.map(|f| f.into())); - let mut res = match headers + let res = match headers .get(header::ACCEPT) .and_then(|header| header.to_str().ok()) { @@ -134,10 +127,6 @@ pub async fn list_files( } }; - let _ = res - .headers_mut() - .insert(AUTHORIZATION, headers.get(AUTHORIZATION).unwrap().clone()); - Ok(res) } @@ -148,7 +137,7 @@ mod test { body::Body, http::{ Request, StatusCode, - header::{ACCEPT, CONTENT_TYPE}, + header::{ACCEPT, AUTHORIZATION, CONTENT_TYPE}, }, middleware, }; @@ -268,4 +257,31 @@ mod test { // assert_eq!( rr.name, "3f918b737a2b9f72f044d06d6009eb34e0e8d06668209be3ce86e5c18dac0295"); // assert_eq!(rr.size, 363); } + + /// The response must not carry the request's `Authorization` header back. + /// + /// Reflecting it served no purpose and sent the client's credentials back + /// through every proxy on the way. Reading it also panicked whenever there + /// was no header to reflect, which is what happens under `--no-auth`. + #[tokio::test] + async fn test_list_files_does_not_echo_credentials_passes() { + init_test_environment(server_config()); + + let app = Router::new().typed_get(list_files::); + + let request = Request::builder() + .uri("/test_repo/keys/") + .header(ACCEPT, ApiVersionKind::V2.to_static_str()) + .header( + AUTHORIZATION, + basic_auth_header_value("rustic", Some("rustic")), + ) + .body(Body::empty()) + .unwrap(); + + let resp = app.oneshot(request).await.unwrap(); + + assert_eq!(resp.status(), StatusCode::OK); + assert!(resp.headers().get(AUTHORIZATION).is_none()); + } } From e69560746b196cc480cc622f9dd2ab9f21380235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Fri, 14 Aug 2026 08:21:38 +0000 Subject: [PATCH 15/15] fix: skip unreadable directory entries instead of aborting the listing `list_files` unwrapped both the file name and the metadata of every entry it walked, so either one failing killed the process, again because the release profile sets `panic = "abort"`. Both fail in practice: - `entry.metadata()` returns `NotFound` when the file is removed between the directory walk and the size lookup. The listing is serialized lazily, so the window stays open for the whole response. A `forget --prune` running while any client lists files is enough, with no malice involved. Verified by deleting 20000 files under 40 concurrent listings, which aborted the server before this change and does not now. - `file_name().to_str()` returns `None` for a name that is not valid UTF-8. Such a name cannot be written through the API, but it can reach the directory by other means, and it made every listing of that type fail. Both cases now drop the entry from the listing, the vanished one at debug level and the undecodable one at warn level. Neither can be a valid repository object anyway: they are named after a hex digest. --- src/handlers/files_list.rs | 92 +++++++++++++++++++++++++++++++++++--- 1 file changed, 85 insertions(+), 7 deletions(-) diff --git a/src/handlers/files_list.rs b/src/handlers/files_list.rs index b3cf543..17b6f60 100644 --- a/src/handlers/files_list.rs +++ b/src/handlers/files_list.rs @@ -57,6 +57,24 @@ struct RepoPathEntry { size: u64, } +/// Returns the file name of `entry`, or `None` if it is not valid unicode. +/// +/// Every object we store is named after a hex digest, so a name we cannot decode +/// was not written through the API. It is skipped instead of failing the whole +/// listing, which would make the repository unusable. +fn entry_name(entry: &walkdir::DirEntry) -> Option { + match entry.file_name().to_str() { + Some(name) => Some(name.to_string()), + None => { + tracing::warn!( + path = ?entry.path(), + "[list_files] skipping file whose name is not valid unicode", + ); + None + } + } +} + pub async fn list_files( path: P, auth: BasicAuthFromRequest, @@ -81,12 +99,25 @@ pub async fn list_files( .and_then(|header| header.to_str().ok()) { Some(version) if version == ApiVersionKind::V2.to_static_str() => { - let read_dir_version = read_dir.map(|entry| { - RepoPathEntry { - name: entry.file_name().to_str().unwrap().to_string(), - size: entry.metadata().unwrap().len(), - // FIXME: return Err(WebErrorKind::GettingFileMetadataFailed.into()); - } + let read_dir_version = read_dir.filter_map(|entry| { + let name = entry_name(&entry)?; + + let size = match entry.metadata() { + Ok(metadata) => metadata.len(), + // The entry can disappear between walking the directory and + // asking for its size, for instance because another client + // is pruning. Leaving it out of the listing is correct. + Err(err) => { + tracing::debug!( + path = ?entry.path(), + %err, + "[list_files] skipping entry whose metadata is gone", + ); + return None; + } + }; + + Some(RepoPathEntry { name, size }) }); let mut response = Json(&IteratorAdapter::new(read_dir_version)).into_response(); @@ -105,7 +136,7 @@ pub async fn list_files( response } _ => { - let read_dir_version = read_dir.map(|e| e.file_name().to_str().unwrap().to_string()); + let read_dir_version = read_dir.filter_map(|entry| entry_name(&entry)); let mut response = Json(&IteratorAdapter::new(read_dir_version)).into_response(); @@ -284,4 +315,51 @@ mod test { assert_eq!(resp.status(), StatusCode::OK); assert!(resp.headers().get(AUTHORIZATION).is_none()); } + + /// A file whose name is not valid unicode must be skipped, not crash the + /// listing. Such a name cannot have been written through the API, but it can + /// reach the directory by other means. + #[cfg(unix)] + #[tokio::test] + async fn test_list_files_skips_non_unicode_name_passes() { + use std::{ffi::OsStr, fs, os::unix::ffi::OsStrExt, path::PathBuf}; + + init_test_environment(server_config()); + + let dir = PathBuf::from("tests/generated/test_storage/test_repo/keys"); + fs::create_dir_all(&dir).unwrap(); + + // 0xff can never appear in valid UTF-8 + let bogus = dir.join(OsStr::from_bytes(&[0xff, b'a', b'b'])); + fs::write(&bogus, b"x").unwrap(); + + let app = Router::new().typed_get(list_files::); + + let request = Request::builder() + .uri("/test_repo/keys/") + .header(ACCEPT, ApiVersionKind::V2.to_static_str()) + .header( + "Authorization", + basic_auth_header_value("rustic", Some("rustic")), + ) + .body(Body::empty()) + .unwrap(); + + let resp = app.oneshot(request).await.unwrap(); + + assert_eq!(resp.status(), StatusCode::OK); + + let b = resp.into_body().collect().await.unwrap().to_bytes(); + let entries: Vec = serde_json::from_slice(&b).unwrap(); + + // the well-known fixture is still listed, the undecodable name is not + assert!( + entries + .iter() + .any(|e| e.name + == "3f918b737a2b9f72f044d06d6009eb34e0e8d06668209be3ce86e5c18dac0295") + ); + + fs::remove_file(&bogus).unwrap(); + } }