From d7d43fbf2f01ed7098943dfb87019bfa5e99ff42 Mon Sep 17 00:00:00 2001 From: oranges Date: Tue, 7 Jun 2016 11:15:40 +0000 Subject: [PATCH] Improved and safer check for localhost admin My paranoia makes me worry that byond can be tricked into setting a null address --- code/modules/client/client_procs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 1698bef1a0e..d4aa0caca24 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -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)