Add job_globals sanitization, fix duplicate value (#24795)

* Add job_globals sanitization, fix duplicate value

* Remove 'support_positions' job category

* Add Supply dept to jobban list
This commit is contained in:
Zantox
2024-03-27 19:31:08 +00:00
committed by GitHub
parent 608889fbcd
commit 06969b4da1
7 changed files with 79 additions and 23 deletions
+4 -5
View File
@@ -590,6 +590,9 @@
if(check_randomizer(connectiontopic))
return
var/client_address = address
if(!client_address) // Localhost can sometimes have no address set
client_address = "127.0.0.1"
if(sql_id)
//Just the standard check to see if it's actually a number
@@ -598,10 +601,6 @@
if(!isnum(sql_id))
return // Return here because if we somehow didnt pull a number from an INT column, EVERYTHING is breaking
var/client_address = address
if(!client_address) // Localhost can sometimes have no address set
client_address = "127.0.0.1"
//Player already identified previously, we need to just update the 'lastseen', 'ip' and 'computer_id' variables
var/datum/db_query/query_update = SSdbcore.NewQuery("UPDATE player SET lastseen=NOW(), ip=:sql_ip, computerid=:sql_cid, lastadminrank=:sql_ar WHERE id=:sql_id", list(
"sql_ip" = client_address,
@@ -622,7 +621,7 @@
//New player!! Need to insert all the stuff
var/datum/db_query/query_insert = SSdbcore.NewQuery("INSERT INTO player (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, :ckey, Now(), Now(), :ip, :cid, :rank)", list(
"ckey" = ckey,
"ip" = address,
"ip" = client_address,
"cid" = computer_id,
"rank" = admin_rank
))