mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 05:07:51 +01:00
[MIRROR] SQL Injection Fix (#6789)
Co-authored-by: Casey <a.roaming.shadow@gmail.com> Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
This commit is contained in:
co-authored by
Casey
CHOMPStation2
parent
be12322970
commit
3e1cd79788
@@ -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 = SSdbcore.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM erro_ban WHERE (ckey = :t_ckey [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)", list("t_ckey" = ckeytext)) //CHOMPEdit TGSQL
|
||||
|
||||
@@ -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