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 {