Uh oh!
There was an error while loading. Please reload this page.
sqlite: validate maxSize argument in createTagStore() - #63792
Conversation
nodejs-github-bot
commented
Jun 8, 2026
Review requested:
|
68d5139 to
3c0477bCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| code: 'ERR_INVALID_ARG_TYPE', | ||
| message: /maxSize/, | ||
| }); | ||
| assert.throws(() => db.createTagStore(1.5), { | ||
| code: 'ERR_INVALID_ARG_TYPE', |
There was a problem hiding this comment.
This should likely be ERR_OUT_OF_RANGE, like e.g. node -e 'child_process.spawn("/dev/null", { uid: 1.3 })' does
There was a problem hiding this comment.
Fixed — floats now throw ERR_OUT_OF_RANGE instead of ERR_INVALID_ARG_TYPE.
There was a problem hiding this comment.
@Anshikakalpana Can you update the PR description to include this change?
The non-integer values (NaN, floats, strings) no longer throw ERR_INVALID_ARG_TYPE
3c0477b to
406e215CompareAnshikakalpana
commented
Aug 4, 2026
Hi @aduh95! I addressed all the review comments and updated the PR. Could you please take another look when you have a chance? Thanks! |
This comment was marked as outdated.
This comment was marked as outdated.
406e215 to
b81b873CompareCodecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## main #63792 +/- ##
==========================================
- Coverage 90.31% 90.30% -0.02%
==========================================
Files 759 759 Lines 248288 248302 +14 Branches 46857 46858 +1 ==========================================
- Hits 224247 224223 -24 - Misses 15471 15514 +43 + Partials 8570 8565 -5
🚀 New features to boost your workflow:
|
Uh oh!
There was an error while loading. Please reload this page.
b81b873 to
de6789bCompareSigned-off-by: anshikakalpana <anshikajain196872@gmail.com>
de6789b to
6371aa2Compare
This comment was marked as outdated.
This comment was marked as outdated.
nodejs-github-bot
commented
Aug 8, 2026
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
commented
Aug 8, 2026
Landed in 98fd6cb |
Fixes: #63791
database.createTagStore()accepted invalid values for itsmaxSizeargument without throwing. Negative integers caused integer overflow, NaN and floats produced garbage capacity values, and strings were silently ignored.The
maxSizeparameter is documented as{integer}and represents a cache size, so negative values are meaningless.This PR adds validation to reject:
ERR_INVALID_ARG_TYPEERR_OUT_OF_RANGEEdit: non-integer values (NaN, floats, strings) no longer throw
ERR_INVALID_ARG_TYPE.