[MM-27836] Fix possible panic when patching config (#15262)
* Fix possible panic when updating/patching config * Remove un-needed check
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
095e5d788b
Коммит
58c6eabf95
@@ -180,7 +180,7 @@ func patchConfig(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
appCfg := c.App.Config()
|
||||
if *appCfg.ServiceSettings.SiteURL != "" && *cfg.ServiceSettings.SiteURL == "" {
|
||||
if *appCfg.ServiceSettings.SiteURL != "" && (cfg.ServiceSettings.SiteURL == nil || *cfg.ServiceSettings.SiteURL == "") {
|
||||
c.Err = model.NewAppError("patchConfig", "api.config.update_config.clear_siteurl.app_error", nil, "", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user