Skip to content

Commit

Permalink
fix: upload check if disable sub folder (close #3741)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Mar 7, 2023
1 parent d484219 commit 3d3f23e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/middlewares/fsup.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func FsUp(c *gin.Context) {
return
}
}
if !(common.CanAccess(user, meta, path, password) && (user.CanWrite() || common.CanWrite(meta, path))) {
if !(common.CanAccess(user, meta, path, password) && (user.CanWrite() || common.CanWrite(meta, stdpath.Dir(path)))) {
common.ErrorResp(c, errs.PermissionDenied, 403)
c.Abort()
return
Expand Down

0 comments on commit 3d3f23e

Please sign in to comment.