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

Finally fix #70 with correct percent-encoding #72

Merged
merged 2 commits into from
Jul 19, 2024
Merged

Finally fix #70 with correct percent-encoding #72

merged 2 commits into from
Jul 19, 2024

Conversation

gernot-h
Copy link
Collaborator

@gernot-h gernot-h commented Jun 26, 2024

As discussed in #71, the previous fix hard-replaced certain special characters by ":" in all external references, so this reverts #71.

Instead, I think we need to percent-encode filenames.

This reverts commit 0e935d1.

It fixed the crash of #70, but by always replacing special characters in
references by ":", so an external reference pointing to the "source
archive" "a%1.zip" would become "a:1.zip" while it should be
percent-encoded to "a%251.zip".
If an existing attachment contains a special character like "%", the BOM
writer crashed as this is not allowed in CycloneDX external reference
URLs.

Fixes #70
@gernot-h
Copy link
Collaborator Author

@cboehm-it, @sachinshaji, perhaps you want to have a look and test with your use case.

@tngraf tngraf merged commit ea98c5e into main Jul 19, 2024
5 checks passed
@gernot-h gernot-h deleted the test-issue70 branch September 4, 2024 14:15
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.

2 participants