classification
Title: cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter
Type: behavior Stage: resolved
Components: Versions: Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: hawkowl, ned.deily, serhiy.storchaka
Priority: Keywords: patch

Created on 2018-05-14 14:30 by hawkowl, last changed 2018-05-15 11:45 by hawkowl. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 6804 merged hawkowl, 2018-05-14 15:19
PR 6837 merged miss-islington, 2018-05-14 22:13
PR 6838 merged ned.deily, 2018-05-14 22:14
PR 6840 merged miss-islington, 2018-05-14 22:16
Messages (8)
msg316510 - (view) Author: Amber Brown (hawkowl) * Date: 2018-05-14 14:30
Lack of this parameter means that you may get an exception (if the incoming data is an invalid encoding) you can not get around.

This causes Twisted to be unable to provide a compatible API on Python 3.7.
msg316593 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-05-14 22:11
New changeset 545c955be997efd6b3827b981024e6b9945d82d1 by Ned Deily (Amber Brown) in branch 'master':
bpo-33497: Add errors param to cgi.parse_multipart and make an encoding in FieldStorage use the given errors (GH-6804)
https://github.com/python/cpython/commit/545c955be997efd6b3827b981024e6b9945d82d1
msg316594 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-05-14 22:15
New changeset d063b84d9ee435e9ae981c18faccaff5562792c3 by Ned Deily in branch 'master':
bpo-33497: Add NEWS and ACKS entries. (GH-6838)
https://github.com/python/cpython/commit/d063b84d9ee435e9ae981c18faccaff5562792c3
msg316596 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-05-14 22:20
New changeset e8f968dcde520160bea7c98d298e58128f9abaa4 by Ned Deily (Miss Islington (bot)) in branch '3.7':
bpo-33497: Add errors param to cgi.parse_multipart and make an encoding in FieldStorage use the given errors (GH-6804) (GH-6837)
https://github.com/python/cpython/commit/e8f968dcde520160bea7c98d298e58128f9abaa4
msg316598 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-05-14 22:21
New changeset 5195039bb5529f1b18d30e8bfcabdee739912d76 by Ned Deily (Miss Islington (bot)) in branch '3.7':
bpo-33497: Add NEWS and ACKS entries. (GH-6838) (GH-6840)
https://github.com/python/cpython/commit/5195039bb5529f1b18d30e8bfcabdee739912d76
msg316599 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-05-14 22:22
Thanks for the report and the PR, @hawkowl!  Merged for 3.7.0rc1.
msg316601 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-05-14 22:30
Is 'replace' the good default value? 'strict' is the default value for most encoding/decoding operations. 'surrogateescape' is used if the failure and the loss of information are not desirable (like in filenames decoding). 'backslashreplace' is good if we want to avoid a failure, but want to expose undecodable bytes in human-readable form.
msg316640 - (view) Author: Amber Brown (hawkowl) * Date: 2018-05-15 11:45
This change mirrors the default in FieldStorage (which it calls). If it's not the best option, then it would need to be changed in FieldStorage too.

(personally, I don't like strict because UnicodeDecodeErrors on untrusted user input kind of sucks, but also replace is kind of broken as well.)
History
Date User Action Args
2018-05-15 11:45:32hawkowlsetmessages: + msg316640
2018-05-14 22:30:01serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg316601
2018-05-14 22:22:48ned.deilysetstatus: open -> closed
priority: release blocker ->
messages: + msg316599

resolution: fixed
stage: patch review -> resolved
2018-05-14 22:21:12ned.deilysetmessages: + msg316598
2018-05-14 22:20:10ned.deilysetmessages: + msg316596
2018-05-14 22:16:39miss-islingtonsetpull_requests: + pull_request6521
2018-05-14 22:15:17ned.deilysetmessages: + msg316594
2018-05-14 22:14:35ned.deilysetpull_requests: + pull_request6520
2018-05-14 22:13:05miss-islingtonsetpull_requests: + pull_request6519
2018-05-14 22:11:57ned.deilysetmessages: + msg316593
2018-05-14 15:21:03ned.deilysetversions: + Python 3.8
2018-05-14 15:19:09hawkowlsetkeywords: + patch
stage: patch review
pull_requests: + pull_request6489
2018-05-14 14:33:20twouterssetpriority: normal -> release blocker
nosy: + ned.deily
2018-05-14 14:30:10hawkowlcreate