🐛 fixed checking the parent folder when checked the password of the current folder

pull/548/head
微凉 2021-11-25 16:24:39 +08:00
parent 2f669ac45c
commit 59b8f1084a
1 changed files with 1 additions and 2 deletions

View File

@ -31,8 +31,7 @@ func Path(c *gin.Context) {
return
}
// TODO hide or ignore?
}
if conf.CheckParent {
} else if conf.CheckParent {
if !CheckParent(filepath.Dir(req.Path), req.Password) {
ErrorResp(c, fmt.Errorf("wrong password"), 401)
return