Fix WebDAV auth: use map_or for password check
This commit is contained in:
@@ -94,7 +94,7 @@ async fn run_webdav_server(
|
||||
|
||||
let valid = match (auth, expected) {
|
||||
(Some((u, p)), Some(exp)) => {
|
||||
u == exp.username && exp.password.as_ref().is_none_or(|exp_p| p == *exp_p)
|
||||
u == exp.username && exp.password.as_ref().map_or(true, |exp_p| p == *exp_p)
|
||||
}
|
||||
_ => false,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user