Skip to content

Commit 73925e5

Browse files
committed
Turn trusted schema off.
1 parent 516595d commit 73925e5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/sqlite/SQLiteWorkspace.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,7 @@ public final class SQLiteWorkspace: Workspace {
638638
let writer = SQLiteConnection(filePath: filePath, createIfMissing: true, readOnly: false)
639639
else { return nil }
640640
sqlite3_busy_timeout(writer.sqlite, 30_000)
641+
sqlite3_exec(writer.sqlite, "PRAGMA trusted_schema=OFF", nil, nil, nil)
641642
sqlite3_exec(writer.sqlite, "PRAGMA journal_mode=WAL", nil, nil, nil)
642643
switch synchronous {
643644
case .normal:
@@ -657,6 +658,7 @@ public final class SQLiteWorkspace: Workspace {
657658
let writer = SQLiteConnection(filePath: filePath, createIfMissing: true, readOnly: false)
658659
else { return nil }
659660
sqlite3_busy_timeout(writer.sqlite, 30_000)
661+
sqlite3_exec(writer.sqlite, "PRAGMA trusted_schema=OFF", nil, nil, nil)
660662
sqlite3_exec(writer.sqlite, "PRAGMA journal_mode=WAL", nil, nil, nil)
661663
switch synchronous {
662664
case .normal:

0 commit comments

Comments
 (0)