New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-105704: Disallow IPv6 URLs with invalid prefix/suffix #111261
base: main
Are you sure you want to change the base?
Conversation
bcail
commented
Oct 24, 2023
•
edited by bedevere-app
bot
edited by bedevere-app
bot
- Issue: urlparse does not flag hostname *containing* [ or ] as incorrect #105704
The following commit authors need to sign the Contributor License Agreement: |
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
@bcail Would it be possible to also add a test case for having a bracket in the username / password? Because this is case where the current implementation fails for me, but it should work according to the referenced spec. |
@pschoen-itsc Sure, if there's consensus. What about this comment? Doesn't that comment argue that the spec says that brackets in the username/password should be percent-encoded? |
@bcail There was a breaking change which wasn't covered by the tests. So at least we should habe tests which cover the spec (not the "faulty" implementation before 3.11.4). (Edited because to stupid to read...) |
Here's the description of what characters should be encoded in user info. Looks like we don't currently check for characters (like @orsenthil Do we want to add some checking for characters that weren't properly encoded, and should we decode the encoded characters in the username/password? |
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
I also just pushed a commit that adds the checking for bytes URLs as well. |
dd954f2
to
5944939
Compare
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |