CHG: make ip matching for sqlite-black/whitelisted a strict match instead of a loose one

Este commit está contenido en:
ps 2014-06-28 16:19:48 +00:00
padre df573130df
commit 0b0c956dd5
Se han modificado 1 ficheros con 2 adiciones y 2 borrados

Ver fichero

@ -246,7 +246,7 @@ bool Database::whitelistedIP(string p_ip)
{
string sql="";
sql="SELECT ip FROM whitelisted_ips WHERE ip=SUBSTR(\""+p_ip+"\",0,LENGTH(ip)) LIMIT 1;";
sql="SELECT ip FROM whitelisted_ips WHERE ip=\""+p_ip+"\" LIMIT 1;";
if(countRows(sql)>0)
return true;
@ -306,7 +306,7 @@ bool Database::blacklistedIP(string p_ip)
{
string sql="";
sql="SELECT ip FROM blacklisted_ips WHERE ip=SUBSTR(\""+p_ip+"\",0,LENGTH(ip)) LIMIT 1;";
sql="SELECT ip FROM blacklisted_ips WHERE ip=\""+p_ip+"\" LIMIT 1;";
if(countRows(sql)>0)
return true;