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

Construction of an Inferred URL for a Package is dropping the plus sign #181

Open
DennisClark opened this issue Sep 10, 2024 · 3 comments · May be fixed by package-url/packageurl-python#174
Assignees
Labels
bug Something isn't working

Comments

@DennisClark
Copy link
Member

Adding the Package available at https://github.com/facebook/sapling/archive/refs/tags/0.2.20240718-145624+f4e9df48.tar.gz to DejaCode is generally successful, but there is a problem with the Inferred URL:

Package URL: pkg:github/facebook/[email protected]%20f4e9df48
Filename: sapling-0.2.20240718-145624-f4e9df48.tar.gz
Download URL: https://github.com/facebook/sapling/archive/refs/tags/0.2.20240718-145624+f4e9df48.tar.gz
Inferred URL: https://github.com/facebook/sapling/tree/0.2.20240718-145624 f4e9df48

Note that the Inferred URL has a gap (space) where there ought to be a + (plus) sign.
If you click on it in the DejaCode user UI you get a 404.
If you copy the whole thing, and edit it to restore the + then you get the intended repo page.

@OmkarPh
Copy link

OmkarPh commented Nov 5, 2024

In this draft PR - package-url/packageurl-python#174, for now I've updated only the purl2url for github

Similar to this, golang pypi cargo etc also use version (which has potential spaces) from the purl_data to form inferred URL, If @tdruez is not working on the issue already, i can update those too

@OmkarPh
Copy link

OmkarPh commented Nov 5, 2024

Also, if we try to add package using purl - pkg:github/facebook/[email protected]%20f4e9df48
it resolves to incorrect download URL with a space instead of +
image

I've fixed this too in the PR

@DennisClark
Copy link
Member Author

@OmkarPh thanks for working on this; we'll try to get it reviewed soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants