[New-bugs-announce] [issue41398] cgi module, parse_multipart fails

Magnus Johnsson report at bugs.python.org
Sun Jul 26 05:58:23 EDT 2020


New submission from Magnus Johnsson <magnusjjj at gmail.com>:

When using the cgi module, parse_multipart fails with the supplied file with the error:

Invalid boundary in multipart form: b''

A sample program that demonstrates the error:
import cgi
f = open("60_Request.txt", "r")
print(cgi.parse_multipart(f, {'boundary': b'BgTzK0jM20UH01naJdsmAWUj7sqqeoikGZvh3mo9', 'CONTENT-LENGTH': 3992}))

This affects for instance Twisted, and all its dependencies.

----------
files: 60_Request.txt
messages: 374307
nosy: Magnus Johnsson
priority: normal
severity: normal
status: open
title: cgi module, parse_multipart fails
versions: Python 3.7, Python 3.8
Added file: https://bugs.python.org/file49340/60_Request.txt

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41398>
_______________________________________


More information about the New-bugs-announce mailing list