Issue 33497: cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter (original) (raw)

Created on 2018-05-14 14:30 by hawkowl, last changed 2022-04-11 14:59 by admin. 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
2022-04-11 14:59:00 admin set github: 77678
2018-05-15 11:45:32 hawkowl set messages: +
2018-05-14 22:30:01 serhiy.storchaka set nosy: + serhiy.storchakamessages: +
2018-05-14 22:22:48 ned.deily set status: open -> closedpriority: release blocker -> messages: + resolution: fixedstage: patch review -> resolved
2018-05-14 22:21:12 ned.deily set messages: +
2018-05-14 22:20:10 ned.deily set messages: +
2018-05-14 22:16:39 miss-islington set pull_requests: + <pull%5Frequest6521>
2018-05-14 22:15:17 ned.deily set messages: +
2018-05-14 22:14:35 ned.deily set pull_requests: + <pull%5Frequest6520>
2018-05-14 22:13:05 miss-islington set pull_requests: + <pull%5Frequest6519>
2018-05-14 22:11:57 ned.deily set messages: +
2018-05-14 15:21:03 ned.deily set versions: + Python 3.8
2018-05-14 15:19:09 hawkowl set keywords: + patchstage: patch reviewpull_requests: + <pull%5Frequest6489>
2018-05-14 14:33:20 twouters set priority: normal -> release blockernosy: + ned.deily
2018-05-14 14:30:10 hawkowl create