mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-09 00:59:02 +03:00
fix: login successed but popup Forbidden (#437)
This commit is contained in:
@@ -429,6 +429,7 @@ fn is_readonly_method(method: &Method) -> bool {
|
||||
|| method == Method::OPTIONS
|
||||
|| method == Method::HEAD
|
||||
|| method.as_str() == "PROPFIND"
|
||||
|| method.as_str() == "AUTH"
|
||||
}
|
||||
|
||||
fn strip_prefix<'a>(search: &'a [u8], prefix: &[u8]) -> Option<&'a [u8]> {
|
||||
|
||||
@@ -200,7 +200,10 @@ impl Server {
|
||||
.map(|(k, v)| (k.to_string(), v.to_string()))
|
||||
.collect();
|
||||
|
||||
if method.as_str() == "WRITEABLE" {
|
||||
if method.as_str() == "AUTH" {
|
||||
if user.is_none() {
|
||||
self.auth_reject(&mut res)?;
|
||||
}
|
||||
return Ok(res);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user