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

PackageURL.fromString() failure when name starts with colon character #45

Closed
vladh1 opened this issue Aug 8, 2023 · 2 comments
Closed

Comments

@vladh1
Copy link

vladh1 commented Aug 8, 2023

const purlString = new PackageURL('generic', null, ':name', '1.0.0').toString();
const purl = PackageURL.fromString(purlString);

The second line fails to parse the purl string with the error:
Error: purl is missing the required "type" component.

@aniruth37
Copy link
Contributor

Raised #55 to fix this

@steven-esser
Copy link
Collaborator

v1.2.1 released to npm with the fix

steven-esser added a commit that referenced this issue Nov 9, 2023
* 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]>
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

No branches or pull requests

3 participants