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 an issue with none and 0 in expressions. #1697

Merged
merged 1 commit into from
Apr 28, 2022

Conversation

wxsBSD
Copy link
Collaborator

@wxsBSD wxsBSD commented Apr 28, 2022

As discussed in #1695, there is an
issue with some expressions involving "0" (and by extension "none"). If you
said "0 of them" and one of them matched we would evaluate that expression to
true because we never checked for the special 0 case.

Turns out this bug has existed for a while now but was likely never triggered
because not many people would say "0 of them" before the "none" keyword came
around. However, the author of the issue is correct that this should have been
exposed with better tests when I implemented the none keyword.

Fixes #1695.

As discussed in VirusTotal#1695, there is an
issue with some expressions involving "0" (and by extension "none"). If you
said "0 of them" and one of them matched we would evaluate that expression to
true because we never checked for the special 0 case.

Turns out this bug has existed for a while now but was likely never triggered
because not many people would say "0 of them" before the "none" keyword came
around. However, the author of the issue is correct that this should have been
exposed with better tests when I implemented the none keyword.

Fixes VirusTotal#1695.
@plusvic plusvic merged commit a6ccc8f into VirusTotal:master Apr 28, 2022
@wxsBSD wxsBSD deleted the fix_1695 branch May 16, 2022 14:46
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.

'none' new token doesn't work as expected
2 participants