mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-08-28 04:18:52 +00:00
fix(db): use parameterized queries to prevent SQL injection in getJailNames
This commit is contained in:
parent
557e7eecf9
commit
3282035568
1 changed files with 1 additions and 1 deletions
|
|
@ -443,7 +443,7 @@ class Fail2BanDb(object):
|
|||
if enabled is None:
|
||||
cur.execute("SELECT name FROM jails")
|
||||
else:
|
||||
cur.execute("SELECT name FROM jails WHERE enabled=%s" %
|
||||
cur.execute("SELECT name FROM jails WHERE enabled=?",
|
||||
(int(enabled),))
|
||||
return set(row[0] for row in cur.fetchmany())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue