diff --git a/router/upload.go b/router/upload.go index 5d23d87a..95d67f54 100644 --- a/router/upload.go +++ b/router/upload.go @@ -107,6 +107,9 @@ func (f *uploadForm) ExtractInfo(r *http.Request) error { f.Magnet = strings.TrimSpace(f.Magnet) cache.Impl.ClearAll() defer r.Body.Close() + if len(f.Description) > 500 { + return errInvalidTorrentDescription + } catsSplit := strings.Split(f.Category, "_") // need this to prevent out of index panics