Skip to content

Commit 9dc7cf7

Browse files
Lanfeiclaude
andcommitted
fix(webdav): align MetaPassKey behavior with FTP auth logic
For guest users, the WebDAV password input serves as the meta folder password (consistent with FTP anonymous/guest handling). For authenticated users, MetaPassKey is set to empty string since their login password is not the meta folder password. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0e78a2b commit 9dc7cf7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

server/webdav.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ func WebDAVAuth(c *gin.Context) {
143143
return
144144
}
145145
common.GinWithValue(c, conf.UserKey, user)
146-
common.GinWithValue(c, conf.MetaPassKey, password)
146+
if user.IsGuest() {
147+
common.GinWithValue(c, conf.MetaPassKey, password)
148+
} else {
149+
common.GinWithValue(c, conf.MetaPassKey, "")
150+
}
147151
c.Next()
148152
}
149153

0 commit comments

Comments
 (0)