[s] Fixes an exploit allowing admins to read any file (#26107)

* THE SECURITY HOLE PILE DON'T STOP GETTING TALLER

* ARE YOU FUCKING SERIOUS?
This commit is contained in:
Cyberboss
2017-04-12 18:54:17 -06:00
committed by duncathan salt
parent 8593ad5324
commit b9f41db32c
2 changed files with 3 additions and 11 deletions
+2 -9
View File
@@ -46,7 +46,7 @@
var/x = round(world.maxx/2)
var/y = round(world.maxy/2)
var/list/bounds = maploader.load_map(get_file(), x, y)
var/list/bounds = maploader.load_map(file(mappath), x, y)
if(!bounds)
return FALSE
@@ -67,7 +67,7 @@
if(T.y+height > world.maxy)
return
var/list/bounds = maploader.load_map(get_file(), T.x, T.y, T.z, cropMap=TRUE)
var/list/bounds = maploader.load_map(file(mappath), T.x, T.y, T.z, cropMap=TRUE)
if(!bounds)
return
@@ -77,13 +77,6 @@
log_game("[name] loaded at at [T.x],[T.y],[T.z]")
return TRUE
/datum/map_template/proc/get_file()
if(mappath)
. = file(mappath)
if(!.)
world.log << "The file of [src] ([mappath]) appears to be empty/non-existent."
/datum/map_template/proc/get_affected_turfs(turf/T, centered = FALSE)
var/turf/placement = T
if(centered)