Reject partially numeric search parameters - #94
Merged
ralyodio merged 1 commit intoSep 12, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Malformed numeric query strings such as
limit=25oops,offset=10.5, andsalaryMin=50000usdcurrently accept the numeric prefix and silently change search results. Require the complete trimmed value to be a signed base-10 integer before applying the existing fallback and clamping rules. Valid signs, leading zeroes, bounds and other search filters remain unchanged.Fixes #89. This is an independent implementation of the reported issue.
Validation:
node --test test/query-integers.test.tson Node 24.19.0: 8 failed / 3 passed before, 11 passed after. Includes malformed suffixes, decimal/exponent/hex forms, empty/non-finite input, valid bounds, and URL reconstruction. Full application build, database tests and browser checks were not run locally; this change is limited to the pure query parser.If this additional fix qualifies for the advertised per-fix reward, please confirm its amount and settlement with the platform application. It is separate from PR #78 and does not request that earlier reward twice.