Fix panic if JSON null value is passed as channel update (#23629)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9c656c25d9
Коммит
3705d7af4d
@@ -125,7 +125,7 @@ func updateChannel(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
var channel *model.Channel
|
||||
err := json.NewDecoder(r.Body).Decode(&channel)
|
||||
if err != nil {
|
||||
if err != nil || channel == nil {
|
||||
c.SetInvalidParamWithErr("channel", err)
|
||||
return
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user