◐ Shell
reader mode source ↗
Skip to content

[Security] bpo-30713: Reject newline in urllib.parse#2303

Closed
vstinner wants to merge 1 commit into
python:masterfrom
vstinner:urllib_newline
Closed

[Security] bpo-30713: Reject newline in urllib.parse#2303
vstinner wants to merge 1 commit into
python:masterfrom
vstinner:urllib_newline

Conversation

@vstinner

Copy link
Copy Markdown
Member

The splittype(), splitport() and splithost() functions of the
urllib.parse module now reject URLs which contain a newline
character.

The splittype(), splitport() and splithost() functions of the
urllib.parse module now reject URLs which contain a newline
character.
@vstinner vstinner changed the title bpo-30713: Reject newline in urllib.parse Jun 28, 2017
@vstinner vstinner added the A security issue label Jun 28, 2017
@vadmium

vadmium commented Jul 1, 2017

Copy link
Copy Markdown
Member

Sorry @Haypo, I think newlines are a special case in some regular expression implementations, but I don’t remember the details for Python, so it is not clear to me what your code will do. I trust Serhiy has better knowledge with regular expressions :)

@vstinner

Copy link
Copy Markdown
Member Author

https://bugs.python.org/issue29606 was fixed in ftplib. urllib is not the right place to reject invalid inputs.

@vstinner vstinner closed this Jul 26, 2017
@vstinner vstinner deleted the urllib_newline branch July 26, 2017 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-security A security issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants