fix: webdav only see public folder even logging in (#231)

This commit is contained in:
sigoden
2023-06-05 11:40:31 +08:00
committed by GitHub
parent 8be545d3da
commit 6be36b8e51
3 changed files with 30 additions and 16 deletions

View File

@@ -201,3 +201,15 @@ fn auth_partial_index(
);
Ok(())
}
#[rstest]
fn no_auth_propfind_dir(
#[with(&["--auth", "user:pass@/:rw", "--auth", "@/dir-assets", "-A"])] server: TestServer,
) -> Result<(), Error> {
let resp = fetch!(b"PROPFIND", server.url()).send()?;
assert_eq!(resp.status(), 207);
let body = resp.text()?;
assert!(body.contains("<D:href>/dir-assets/</D:href>"));
assert!(body.contains("<D:href>/dir1/</D:href>"));
Ok(())
}