Merge pull request #5909 from Razharas/InputFix

Fix of atmos input exploit
This commit is contained in:
hornygranny
2014-11-24 10:40:51 -08:00
6 changed files with 10 additions and 10 deletions
@@ -148,8 +148,7 @@ Passive gate is similar to the regular pump except:
if(href_list["power"])
on = !on
if(href_list["set_press"])
var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",src.target_pressure) as num
src.target_pressure = max(0, min(4500, new_pressure))
target_pressure = max(0, min(4500, safe_input("Pressure control", "Enter new output pressure (0-4500kPa)", target_pressure)))
usr.set_machine(src)
src.update_icon()
src.updateUsrDialog()
@@ -156,8 +156,7 @@ Thus, the two variables affect pump operation are set in New():
if(href_list["power"])
on = !on
if(href_list["set_press"])
var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",src.target_pressure) as num
src.target_pressure = max(0, min(4500, new_pressure))
target_pressure = max(0, min(4500, safe_input("Pressure control", "Enter new output pressure (0-4500kPa)", target_pressure)))
usr.set_machine(src)
src.update_icon()
src.updateUsrDialog()
@@ -152,8 +152,7 @@ Thus, the two variables affect pump operation are set in New():
if(href_list["power"])
on = !on
if(href_list["set_transfer_rate"])
var/new_transfer_rate = input(usr,"Enter new output volume (0-200l/s)","Flow control",src.transfer_rate) as num
src.transfer_rate = max(0, min(200, new_transfer_rate))
transfer_rate = max(0, min(200, safe_input("Pressure control", "Enter new output pressure (0-4500kPa)", transfer_rate)))
usr.set_machine(src)
src.update_icon()
src.updateUsrDialog()