Skip to content
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

Protect @ as safe character when cleaning URLs #6440

Merged
merged 1 commit into from Apr 25, 2019

Conversation

@nicolasbock
Copy link
Contributor

@nicolasbock nicolasbock commented Apr 24, 2019

Remote URLs that contain a link to a git repository and a tag
reference will have the @ character converted into %40. This is
incorrect.

Fixes: #6437

Signed-off-by: Nicolas Bock nicolasbock@gmail.com

@nicolasbock
Copy link
Contributor Author

@nicolasbock nicolasbock commented Apr 24, 2019

I am not sure about the added test. When I locally run tox without the safe argument, the test still passes. The @ character doesn't seem to be quoted as the OP found in #6437 .

Loading

@cjerdonek
Copy link
Member

@cjerdonek cjerdonek commented Apr 24, 2019

It might be because you're missing a path portion. Try something more like-- "git+ssh://example.com/path.git@1.0#egg=my-package-1.0.201810251140"

Loading

@nicolasbock
Copy link
Contributor Author

@nicolasbock nicolasbock commented Apr 25, 2019

I think you are right @cjerdonek . Please have a look at the updated change set.

Loading

Copy link
Member

@cjerdonek cjerdonek left a comment

Thanks! Some comments.

Loading

news/6440.bugfix Outdated Show resolved Hide resolved
Loading
src/pip/_internal/index.py Show resolved Hide resolved
Loading
tests/unit/test_index.py Outdated Show resolved Hide resolved
Loading
tests/unit/test_index.py Outdated Show resolved Hide resolved
Loading
@nicolasbock
Copy link
Contributor Author

@nicolasbock nicolasbock commented Apr 25, 2019

Thanks @cjerdonek for the helpful comments! I pushed an updated version of this change set.

Loading

Remote URLs that contain a link to a git repository and a tag
reference will have the `@` character converted into `%40`. This is
incorrect.

Fixes: pypa#6437

Signed-off-by: Nicolas Bock <nicolasbock@gmail.com>
Copy link
Member

@cjerdonek cjerdonek left a comment

Looks great. Thanks for your quick attention to this, @nicolasbock.

Loading

@cjerdonek cjerdonek merged commit 60d3f11 into pypa:master Apr 25, 2019
29 checks passed
Loading
@lock
Copy link

@lock lock bot commented May 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Loading

@lock lock bot added the S: auto-locked label May 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants