fix: preserve global WebDAV password when settings save omits it

This commit is contained in:
OpenClaw Agent
2026-09-17 06:24:29 +08:00
parent 684665f0be
commit efb2ff33b4
+3 -1
View File
@@ -45,7 +45,9 @@ func (a *App) putSettings(c *gin.Context) {
if x, ok := v["webdavUser"]; ok { if x, ok := v["webdavUser"]; ok {
a.cfg.WebDAVUser = x a.cfg.WebDAVUser = x
} }
if x, ok := v["webdavPass"]; ok { // The GET endpoint intentionally never returns the WebDAV password.
// Therefore an empty webdavPass means "keep the existing password", not clear it.
if x, ok := v["webdavPass"]; ok && x != "" {
a.cfg.WebDAVPass = x a.cfg.WebDAVPass = x
} }
if x, ok := v["webdavPath"]; ok { if x, ok := v["webdavPath"]; ok {