GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||
GeezerVison is showing github.com — sqlite: always copy changeset before applying by trivikr · Pull Request #65870 · nodejs/node Conversation
Member
Refs: #65286 (comment) SQLite can invoke JavaScript through user-defined SQL functions while applying a changeset, even when no filter or conflict callback is set. Copy non-empty changesets unconditionally so JavaScript cannot detach or modify the input while SQLite is still reading it. Assisted-by: codex
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsSQLite can invoke JavaScript through user-defined SQL functions while applying a changeset, even when no filter or conflict callback is set. Copy non-empty changesets unconditionally so JavaScript cannot detach or modify the input while SQLite is still reading it. Signed-off-by: Kamat, Trivikram <[email protected]> Assisted-by: codex
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@ ## main #65870 +/- ## ========================================== - Coverage 90.19% 90.18% -0.01% ========================================== Files 771 771 Lines 264628 264627 -1 Branches 50237 50235 -2 ========================================== - Hits 238683 238658 -25 - Misses 16953 16960 +7 - Partials 8992 9009 +17
🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It seems the same as Matteo did in his first implementation. If we're on this endeavor, I'd rather have track of all the user defined functions and prevent them being called on all the surfaces. WDYT? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Created #65880 to track registered user-defined functions separately. Can we keep this PR focused on protecting the changeset buffer while preserving existing SQL function behavior? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Landed in f9072f3 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
SQLite can invoke JavaScript through user-defined SQL functions while applying a changeset, even when no filter or conflict callback is set. Copy non-empty changesets unconditionally so JavaScript cannot detach or modify the input while SQLite is still reading it. Signed-off-by: Kamat, Trivikram <[email protected]> Assisted-by: codex PR-URL: #65870 Reviewed-By: Edy Silva <[email protected]> Reviewed-By: James M Snell <[email protected]>
SQLite reaches JavaScript through a user-defined SQL function in a CHECK constraint or trigger, not just through an explicit filter or onConflict callback, so the previous condition left the input buffer detachable while SQLite was still reading it. Ports nodejs/node#65870.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.