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

Public purldb API appears to ignore subpaths when submitted as part of a URL #536

Open
johnmhoran opened this issue Sep 26, 2024 · 1 comment
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@johnmhoran
Copy link
Member

It looks like the public purldDB API responds to the inclusion of a # subpath separator followed by the subpath value by ignoring the subpath. An example: in the public API, https://public.purldb.io/api/packages/?purl=pkg:maven/org.elasticsearch/[email protected]#fake/subpath returns the same 2 records returned by https://public.purldb.io/api/packages/?purl=pkg:maven/org.elasticsearch/[email protected] -- the only difference is the presence or absence of #fake/subpath.

I understand that this might be an encoding issue, but note that according to the purl specification, "the '#', '?', '@' and ':' characters must NOT be encoded when used as separators. They may need to be encoded elsewhere" and a bullet further below: "the '#' subpath separator must be encoded as %23 elsewhere". Perhaps the documentation needs to be clarified?

@johnmhoran johnmhoran added bug Something isn't working documentation Improvements or additions to documentation labels Sep 26, 2024
@johnmhoran
Copy link
Member Author

Encoding the subpath separator returns 0 records, which makes sense since I understand the DB has no purls with a subpath. https://public.purldb.io/api/packages/?purl=pkg:maven/org.elasticsearch/[email protected]%23fake/subpath

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

No branches or pull requests

1 participant