Skip to content

Conversation

@matt-phylum
Copy link
Collaborator

Overview

  • with_subpath no longer bypasses subpath canonicalization.
  • The subpath a/%2E%2E/b parses as a/b instead of resulting in ParseError::InvalidEscape (matches a PURL spec change made 2025-02-19)
  • type validation ensures that the first character of the type is a letter, as required by the PURL spec (only applicable when using the string shapes)
  • & characters in qualifier values are escaped to prevent pkg:generic/name?q=a%26b=c turning into pkg:generic/name?q=a&b=c

These changes should be safe. I'm expecting that some time soon PURL will make a breaking change to canonicalization (it's basically unavoidable because the spec wasn't clear and all the implementations interpreted it differently). This may be the last release in the 0.1.x line.

Checklist

  • Does this PR have an associated issue?
  • Have you ensured that you have met the expected acceptance criteria?
  • Have you created sufficient tests?

Issue

What issue(s) does this PR close. Use the closes #<issueNum> here.

@matt-phylum matt-phylum requested review from a team as code owners March 12, 2025 19:02
@matt-phylum matt-phylum merged commit 93152aa into main Mar 13, 2025
6 checks passed
@matt-phylum matt-phylum deleted the matt/release branch March 13, 2025 11:55
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.

3 participants