mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 20:47:43 +01:00
SQL Injection Fix
This commit is contained in:
@@ -46,11 +46,11 @@
|
||||
var/cidquery = ""
|
||||
if(address)
|
||||
failedip = 0
|
||||
ipquery = " OR ip = '[address]' "
|
||||
ipquery = " OR ip = '[sanitizeSQL(address)]' "
|
||||
|
||||
if(computer_id)
|
||||
failedcid = 0
|
||||
cidquery = " OR computerid = '[computer_id]' "
|
||||
cidquery = " OR computerid = '[sanitizeSQL(computer_id)]' "
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM erro_ban WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
|
||||
@@ -81,4 +81,3 @@
|
||||
message_admins("[key] has logged in with a blank ip in the ban check.")
|
||||
return ..() //default pager ban stuff
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user