diff options
Diffstat (limited to 'src/mime/multipart/multipart.go')
-rw-r--r-- | src/mime/multipart/multipart.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mime/multipart/multipart.go b/src/mime/multipart/multipart.go index fab676a70a..de533120cd 100644 --- a/src/mime/multipart/multipart.go +++ b/src/mime/multipart/multipart.go @@ -9,6 +9,21 @@ Package multipart implements MIME multipart parsing, as defined in RFC The implementation is sufficient for HTTP (RFC 2388) and the multipart bodies generated by popular browsers. + +# Limits + +To protect against malicious inputs, this package sets limits on the size +of the MIME data it processes. + +Reader.NextPart and Reader.NextRawPart limit the number of headers in a +part to 10000 and Reader.ReadForm limits the total number of headers in all +FileHeaders to 10000. +These limits may be adjusted with the GODEBUG=multipartmaxheaders=<values> +setting. + +Reader.ReadForm further limits the number of parts in a form to 1000. +This limit may be adjusted with the GODEBUG=multipartmaxparts=<value> +setting. */ package multipart |