Commit d02b6d1
committed
Escape all identifier interpolations in the legacy SQLite translator
Apply quote_identifier() (backtick quoting with internal escaping) to
all table names, column names, index names, and trigger names that are
interpolated into SQL queries, token values, or DDL reconstruction
output. Use PDO::quote() for string arguments to pragma functions.
Fix two downstream issues caused by the quoting style change:
- get_autoincrement_column() regex now accepts both backtick and
double-quote delimiters in stored schemas.
- CHANGE COLUMN schema parsing now matches both TYPE_SYMBOL (backtick)
and TYPE_STRING (double-quote) tokens.1 parent 535b42a commit d02b6d1
File tree
2 files changed
+75
-51
lines changed- tests
- wp-includes/sqlite
2 files changed
+75
-51
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1170 | 1170 | | |
1171 | 1171 | | |
1172 | 1172 | | |
1173 | | - | |
| 1173 | + | |
1174 | 1174 | | |
1175 | 1175 | | |
1176 | 1176 | | |
1177 | 1177 | | |
1178 | 1178 | | |
1179 | 1179 | | |
1180 | | - | |
| 1180 | + | |
1181 | 1181 | | |
1182 | 1182 | | |
1183 | 1183 | | |
| |||
0 commit comments