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

hotfix: properly handle purl encoding #61

Closed
wants to merge 2 commits into from

Conversation

steven-esser
Copy link
Collaborator

  • remove unneed exception raising for the version param
  • do not skip URL encoding : and + characters
  • add test cases from old issues

refs: #45, #46, #57

* remove unneed exception raising for the version param
* do not skip URL encoding `:` and `+` characters
* add test cases from old issues

refs: #45, #46, #57

Signed-off-by: Steven Esser <[email protected]>
@@ -122,7 +122,7 @@
{
"description": "docker uses qualifiers and hash image id as versions",
"purl": "pkg:docker/customer/dockerimage@sha256:244fd47e07d1004f0aed9c?repository_url=gcr.io",
"canonical_purl": "pkg:docker/customer/dockerimage@sha256:244fd47e07d1004f0aed9c?repository_url=gcr.io",
"canonical_purl": "pkg:docker/customer/dockerimage@sha256%3A244fd47e07d1004f0aed9c?repository_url=gcr.io",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The official test input says this should be unencoded (':').

I recommend keeping test-suite-data.json exactly the same as in the spec repository and making a separate file for tests that are unique to this repository. That makes it easier to ensure this implementation matches the spec, easier to update the copy of the test suite file, and easier to find tests that could be added to the spec.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.

@chrsch-dev
Copy link

Any updates when this will be merged?

@sschuberth sschuberth requested a review from matt-phylum May 16, 2024 06:41
Signed-off-by: Steven Esser <[email protected]>
@stevehipwell
Copy link

Is there an ETA on getting this in?

@jdalton
Copy link
Collaborator

jdalton commented Aug 1, 2024

Closing as covered by #71

@jdalton jdalton closed this Aug 1, 2024
@jdalton
Copy link
Collaborator

jdalton commented Aug 18, 2024

v2.0.0 has been published 🎉

@sschuberth sschuberth deleted the 57-fix-version-bug branch August 18, 2024 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants