Conversation
close() destroys the connection but keeps the DatabaseSync object, and open() did not replay the state held on it. An authorizer set with setAuthorizer() was not reinstalled, silently dropping a deny-all policy. Limits written through db.limits.* reverted to the constructor values. Extension loading was re-enabled from the constructor ceiling rather than the current setting, leaving the SQL load_extension() function reachable after enableLoadExtension(false). Signed-off-by: Guilherme Araújo <arauujogui@gmail.com> Assisted-by: Claude Code
Collaborator
|
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #66042 +/- ##
==========================================
- Coverage 90.23% 90.21% -0.02%
==========================================
Files 785 789 +4
Lines 269670 270622 +952
Branches 51589 51802 +213
==========================================
+ Hits 243325 244152 +827
- Misses 16825 16943 +118
- Partials 9520 9527 +7
🚀 New features to boost your workflow:
|
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.
close()destroys the SQLite connection but keeps theDatabaseSyncobject, andOpen()did not replay the state held on that object.Three cases:
db.limits.*went only to the connection, so they reverted to the constructor values.allow_load_extension_(the constructor ceiling) instead ofenable_load_extension_(the current setting).db.loadExtension()stayed blocked by its JS guard, but the SQLload_extension()function did not.Fix: re-register the authorizer at the end of
Open(), record runtime limit writes alongside the constructor options so both are replayed, and apply the current load-extension setting rather than the ceiling.