database: always explicit convert ip to str, because may be an IPAddr, that will be unsupported type by bind parameter (as long as we've found any default wrapper handler for sqlite3)

This commit is contained in:
sebres 2016-05-13 22:53:57 +02:00
parent cb280b817f
commit d420148055

View file

@ -455,7 +455,7 @@ class Fail2BanDb(object):
queryArgs.append(MyTime.time() - bantime)
if ip is not None:
query += " AND ip=?"
queryArgs.append(ip)
queryArgs.append(str(ip))
query += " ORDER BY ip, timeofban desc"
return cur.execute(query, queryArgs)