Commit 602fd0ff authored by Jesús Espino's avatar Jesús Espino Committed by Carlos Tadeu Panato Junior

MM-11189: Do not close the connection abruptly on too big emojis (#9071)

parent 2df818b9
......@@ -4,6 +4,8 @@
package api4
import (
"io"
"io/ioutil"
"net/http"
"strings"
......@@ -28,6 +30,8 @@ func (api *API) InitEmoji() {
}
func createEmoji(c *Context, w http.ResponseWriter, r *http.Request) {
defer io.Copy(ioutil.Discard, r.Body)
if !*c.App.Config().ServiceSettings.EnableCustomEmoji {
c.Err = model.NewAppError("createEmoji", "api.emoji.disabled.app_error", nil, "", http.StatusNotImplemented)
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment