refactor: update deps (#604)

pull/605/head
sigoden 2025-08-02 16:56:07 +08:00 committed by GitHub
parent 9c9fca75d3
commit d37762d2b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 356 additions and 339 deletions

673
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@ keywords = ["static", "file", "server", "webdav", "cli"]
clap = { version = "4.5", features = ["wrap_help", "env"] }
clap_complete = "4.5"
chrono = { version = "0.4", default-features = false, features = ["clock"] }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "fs", "io-util", "signal"]}
tokio = { version = "1", features = ["rt-multi-thread", "macros", "fs", "io-util", "signal", "net"]}
tokio-util = { version = "0.7", features = ["io-util", "compat"] }
hyper = { version = "1", features = ["http1", "server"] }
percent-encoding = "2.3"
@ -24,16 +24,16 @@ futures-util = { version = "0.3", default-features = false, features = ["alloc"]
async_zip = { version = "0.0.17", default-features = false, features = ["deflate", "bzip2", "xz", "chrono", "tokio"] }
headers = "0.4"
mime_guess = "2.0"
if-addrs = "0.13"
if-addrs = "0.14"
rustls-pemfile = { version = "2.0", optional = true }
tokio-rustls = { version = "0.26", optional = true, default-features = false, features = ["ring", "tls12"]}
md5 = "0.7"
md5 = "0.8"
lazy_static = "1.4"
uuid = { version = "1.7", features = ["v4", "fast-rng"] }
urlencoding = "2.1"
xml-rs = "0.8"
log = { version = "0.4", features = ["std"] }
socket2 = "0.5"
socket2 = "0.6"
async-stream = "0.3"
walkdir = "2.3"
form_urlencoded = "1.2"
@ -65,7 +65,7 @@ assert_cmd = "2"
reqwest = { version = "0.12", features = ["blocking", "multipart", "rustls-tls"], default-features = false }
assert_fs = "1"
port_check = "0.2"
rstest = "0.25"
rstest = "0.26.1"
regex = "1"
url = "2"
predicates = "3"

View File

@ -423,7 +423,7 @@ pub fn check_auth(
let mut h = Context::new();
h.consume(format!("{auth_user}:{REALM}:{auth_pass}").as_bytes());
let auth_pass = format!("{:x}", h.compute());
let auth_pass = format!("{:x}", h.finalize());
let mut ha = Context::new();
ha.consume(method);
@ -431,7 +431,7 @@ pub fn check_auth(
if let Some(uri) = digest_map.get(b"uri".as_ref()) {
ha.consume(uri);
}
let ha = format!("{:x}", ha.compute());
let ha = format!("{:x}", ha.finalize());
let mut correct_response = None;
if let Some(qop) = digest_map.get(b"qop".as_ref()) {
if qop == &b"auth".as_ref() || qop == &b"auth-int".as_ref() {
@ -452,7 +452,7 @@ pub fn check_auth(
c.consume(qop);
c.consume(b":");
c.consume(&*ha);
format!("{:x}", c.compute())
format!("{:x}", c.finalize())
});
}
}
@ -465,7 +465,7 @@ pub fn check_auth(
c.consume(nonce);
c.consume(b":");
c.consume(&*ha);
format!("{:x}", c.compute())
format!("{:x}", c.finalize())
}
};
if correct_response.as_bytes() == *user_response {
@ -503,7 +503,7 @@ fn validate_nonce(nonce: &[u8]) -> Result<bool> {
//check hash
let mut h = NONCESTARTHASH.clone();
h.consume(secs_nonce.to_be_bytes());
let h = format!("{:x}", h.compute());
let h = format!("{:x}", h.finalize());
if h[..26] == n[8..34] {
return Ok(dur < DIGEST_AUTH_TIMEOUT);
}
@ -581,7 +581,7 @@ fn create_nonce() -> Result<String> {
let mut h = NONCESTARTHASH.clone();
h.consume(secs.to_be_bytes());
let n = format!("{:08x}{:032x}", secs, h.compute());
let n = format!("{:08x}{:032x}", secs, h.finalize());
Ok(n[..34].to_string())
}