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

Fix error if tags contain null byte(s) #471

Merged
merged 3 commits into from
Sep 2, 2023
Merged

Fix error if tags contain null byte(s) #471

merged 3 commits into from
Sep 2, 2023

Conversation

chvp
Copy link
Member

@chvp chvp commented Sep 2, 2023

No test, because I couldn't figure out how to create a file with such tags. I did test locally that the problem files I had scanned without issue.

@chvp chvp added the bug Something isn't working label Sep 2, 2023
@chvp chvp requested a review from robbevp September 2, 2023 09:20
@chvp chvp enabled auto-merge (squash) September 2, 2023 09:20
No test, because I couldn't figure out how to create a file with such tags. I
did test locally that the problem files I had scanned without issue.
@chvp chvp force-pushed the fix/null-byte-tags branch from 6618f2f to 7ecb199 Compare September 2, 2023 09:22
Copy link
Member

@robbevp robbevp left a comment

Choose a reason for hiding this comment

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

I've given a suggestion for a reworded comment.

While I think this fix is fine, I do wonder if it doesn't make more sense to upstream this fix to WahWah? Is there a scenario in which someone would want to keep the null bytes?

app/models/rescan_runner.rb Outdated Show resolved Hide resolved
Co-authored-by: Robbe Van Petegem <[email protected]>
@chvp
Copy link
Member Author

chvp commented Sep 2, 2023

I don't think upstreaming is the right fix. As mentioned in the comment, some programs use the null bytes to separate multiple values in a tag. Other consumers of WahWah might want to go through the effort of using that information.

@chvp chvp requested a review from robbevp September 2, 2023 09:32
@chvp chvp merged commit 848e3bf into main Sep 2, 2023
2 checks passed
@chvp chvp deleted the fix/null-byte-tags branch September 2, 2023 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants