mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-14 01:47:57 +00:00
Fix SQL injection in truncate_data_tables
Signed-off-by: remo-lab <remopanda7@gmail.com>
This commit is contained in:
@@ -195,7 +195,7 @@ def truncate_data_tables(conn: Connection) -> None:
|
||||
WHERE tablename LIKE 'location_road_%'""")
|
||||
|
||||
for table in [r[0] for r in list(cur)]:
|
||||
cur.execute('TRUNCATE ' + table)
|
||||
cur.execute(pysql.SQL('TRUNCATE {}').format(pysql.Identifier(table)))
|
||||
|
||||
conn.commit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user