You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unescaped table names.get_columns builds PRAGMA table_info("{}"), and the row count in get_tables builds SELECT COUNT(*) FROM "{}". Both put the table name inside double quotes without doubling any " in it. A table whose name contains " breaks the read, and a crafted name in an opened database file can inject SQL into those statements. Use pragma_table_info(?1) with a bound parameter, and quote identifiers properly (double every ") for the count.
Index columns from DDL text.get_indexes finds index columns by parsing the CREATE INDEX text and splitting on commas. Expression indexes and columns with COLLATE or DESC come out wrong. Use pragma_index_xinfo(?1) instead.
Add tests with a table and an index whose names contain " and ;, an expression index, and a DESC column. sqlite_get_foreign_keys (#927) already binds the name and can serve as the pattern.
Activity