fix: preserve global WebDAV password when settings save omits it
This commit is contained in:
+3
-1
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user