From efb2ff33b4b3596797a4c047cf2637fc6fd635f4 Mon Sep 17 00:00:00 2001 From: OpenClaw Agent Date: Thu, 17 Sep 2026 06:24:29 +0800 Subject: [PATCH] fix: preserve global WebDAV password when settings save omits it --- settings.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/settings.go b/settings.go index 650805e..e33200e 100644 --- a/settings.go +++ b/settings.go @@ -45,7 +45,9 @@ func (a *App) putSettings(c *gin.Context) { if x, ok := v["webdavUser"]; ok { 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 } if x, ok := v["webdavPath"]; ok {