Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Commit

Permalink
api/url accepts 512k torrents size
Browse files Browse the repository at this point in the history
  • Loading branch information
boypt committed Jul 16, 2021
1 parent 6e2f386 commit e32b0dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/server_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ func (s *Server) apiPOST(r *http.Request) error {
return fmt.Errorf("Invalid remote torrent URL: %s %w", url, err)
}
defer remote.Body.Close()
if remote.ContentLength > 64*1024 {
//enforce max body size (64k?)
if remote.ContentLength > 512*1024 {
//enforce max body size (512k)
return fmt.Errorf("Remote torrent too large")
}
data, err = ioutil.ReadAll(remote.Body)
Expand Down

0 comments on commit e32b0dc

Please sign in to comment.