Fix SQL syntax error when a non-existant channelId is attemted to be viewed. (#9975)

Этот коммит содержится в:
Christopher Speller
2018-12-12 10:08:55 -08:00
коммит произвёл GitHub
родитель 749a3e7538
Коммит fb12a739e5
4 изменённых файлов: 45 добавлений и 31 удалений

Просмотреть файл

@@ -917,7 +917,7 @@ func viewChannel(c *Context, w http.ResponseWriter, r *http.Request) {
}
view := model.ChannelViewFromJson(r.Body)
if view == nil {
if view == nil || !model.IsValidId(view.ChannelId) || (view.PrevChannelId != "" && !model.IsValidId(view.PrevChannelId)) {
c.SetInvalidParam("channel_view")
return
}