bpo-35906: Avoid headers injections in urllib#11768
bpo-35906: Avoid headers injections in urllib#11768matrixise wants to merge 3 commits intopython:masterfrom
Conversation
|
Sorry, I'm late. I'm this bug reporter. |
|
@push0ebp encode the URL? |
|
yes, but because the previous versions haven't encoded the URL, I think that urlopen() shouldn't encode the URL. it may avoid encoding(quote) two times in previous versions. |
|
Is this part of the accepted resolution of CVE-2019-9947? If so, what is blocking the merging of this PR? There has been no action for many weeks. |
|
I would vote for accepting this solution. Could anybody tell me any perceivable legal URL containing |
|
Thanks Matěj
but I am not an expert of the http lib. @orsenthil is the expert of this
part of CPython
|
|
@mcepl There are no urls that are valid containing unencoded \r\n as far as I can tell. In cases where newlines are needed (such as in params) they should be url encoded |
And if they are already not, that it is malformed URL and so it shouldn't be fixed but rejected. I am really turning towards OpenJDK has it right. |
|
There's two important things here.
|
|
OK, I am leaning against this PR and closer to putting #2303 as a patch to all SUSE packages. I just have to torture @vstinner to explain what did he mean by #2303 (comment) . Does it mean that the solution should be somewhere lower in the stack (http.client?). |
https://bugs.python.org/issue30500 has been fixed differently and not directly related to https://bugs.python.org/issue30458 |
|
Thank you for the patch. Based on the last message on this ticket, this is fixed in bpo-30458, so I'm closing this pull request. Please add a comment to bpo-30458 if you believe needs further discussion. Thanks! |
https://bugs.python.org/issue35906