-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
sqlite: allow setting defensive flag #60217
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
base: main
Are you sure you want to change the base?
Conversation
Review requested:
|
IMO it'd be worth considering setting this to enabled by default, either here or in a future semver-major change. >99% of users will have no need to alter engine-level internals. |
@Renegade334 Good point. I think it makes sense to just set defensive as the default here since the SQLite API is experimental and you almost never want to mess with those indeed. better-sqlite3 does the same. https://github.com/WiseLibs/better-sqlite3/blob/ea0d8c73615ce2b6133df67da10c7e6452115d73/docs/unsafe.md?plain=1#L5 |
@Renegade334 Enabled it by default. This PR should have a |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #60217 +/- ##
==========================================
- Coverage 88.56% 88.55% -0.02%
==========================================
Files 704 704
Lines 208125 208158 +33
Branches 40003 40010 +7
==========================================
- Hits 184332 184329 -3
- Misses 15809 15858 +49
+ Partials 7984 7971 -13
🚀 New features to boost your workflow:
|
This comment was marked as outdated.
This comment was marked as outdated.
This reverts commit a1ea22d.
This comment was marked as spam.
This comment was marked as spam.
How do I add a comment for the Notable Changes section? |
Wouldn't the notable change be the follow-up PR rather than this one? |
@aduh95 That works too! |
Could someone restart CI? Looks like a fluke. |
Adds support for setting the defensive flag. See
SQLITE_DBCONFIG_DEFENSIVE
.This is one of the APIs needed for Defense Against The Dark Arts when dealing with untrusted SQL queries. Another being the
sqlite3_limit()
interface, which may be a neat future addition.