Commit f7b4bcc
Open Source Contributor
security: add whitelist validation for SQLite PRAGMA settings
- Add allowed_journal_modes and allowed_sync_modes whitelists
- Validate Config.db.journal_mode and Config.db.synchronous_mode against whitelists
- Raise ValueError if invalid values are provided
This prevents potential SQL injection in PRAGMA statements.1 parent 65e27fb commit f7b4bcc
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
65 | 73 | | |
66 | 74 | | |
67 | 75 | | |
| |||
0 commit comments