diff --git a/app/src/components/CodeEditor/CodeEditor.vue b/app/src/components/CodeEditor/CodeEditor.vue index 3c875171..ee6fde1f 100644 --- a/app/src/components/CodeEditor/CodeEditor.vue +++ b/app/src/components/CodeEditor/CodeEditor.vue @@ -40,7 +40,7 @@ ace.config.setModuleUrl('ace/ext/searchbox', extSearchboxUrl) /> - diff --git a/app/src/views/preference/components/Passkey.vue b/app/src/views/preference/components/Passkey.vue index 10aeaade..1d2b3d04 100644 --- a/app/src/views/preference/components/Passkey.vue +++ b/app/src/views/preference/components/Passkey.vue @@ -1,6 +1,5 @@ - - - - - - - - diff --git a/settings/auth.go b/settings/auth.go index 2dbe3d88..cf75c7b4 100644 --- a/settings/auth.go +++ b/settings/auth.go @@ -1,7 +1,7 @@ package settings type Auth struct { - IPWhiteList []string `json:"ip_white_list" binding:"omitempty,dive,ip" ini:",,allowshadow"` + IPWhiteList []string `json:"ip_white_list" binding:"omitempty,dive,ip" ini:",,allowshadow" protected:"true"` BanThresholdMinutes int `json:"ban_threshold_minutes" binding:"min=1"` MaxAttempts int `json:"max_attempts" binding:"min=1"` } diff --git a/settings/settings.go b/settings/settings.go index 3067ab30..d59d5915 100644 --- a/settings/settings.go +++ b/settings/settings.go @@ -104,6 +104,11 @@ func Save() (err error) { reflectFrom(k, v) } + // fix unable to save empty slice + if len(ServerSettings.RecursiveNameservers) == 0 { + Conf.Section("server").Key("RecursiveNameservers").SetValue("") + } + err = Conf.SaveTo(ConfPath) if err != nil { return