mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 09:35:30 +01:00
Improved and safer check for localhost admin
My paranoia makes me worry that byond can be tricked into setting a null address
This commit is contained in:
@@ -114,7 +114,7 @@ var/next_external_rsc = 0
|
||||
|
||||
//Admin Authorisation
|
||||
var/localhost_addresses = list("127.0.0.1", "::1")
|
||||
if(!address || (address in localhost_addresses))
|
||||
if(address && (address in localhost_addresses))
|
||||
var/datum/admin_rank/localhost_rank = new("!localhost!", 65535)
|
||||
if(localhost_rank)
|
||||
var/datum/admins/localhost_holder = new(localhost_rank, ckey)
|
||||
|
||||
Reference in New Issue
Block a user