Changes to modular computer sanitization and documentation (#20453)

Changes documentation to an md
Changes some santize on inputs to reject_bad_text
Adds handling for the downloader to abort the download if the program is killed
This commit is contained in:
Shadowlight213
2016-09-15 11:59:28 +12:00
committed by oranges
parent 5232ceee8f
commit 2c13b47b6d
5 changed files with 55 additions and 46 deletions
@@ -109,7 +109,7 @@ var/global/nttransfer_uid = 0
if(!remote || !remote.provided_file)
return
if(remote.server_password)
var/pass = sanitize(input(usr, "Code 401 Unauthorized. Please enter password:", "Password required"))
var/pass = reject_bad_text(input(usr, "Code 401 Unauthorized. Please enter password:", "Password required"))
if(pass != remote.server_password)
error = "Incorrect Password"
return
@@ -127,7 +127,7 @@ var/global/nttransfer_uid = 0
provided_file = null
return 1
if("PRG_setpassword")
var/pass = sanitize(input(usr, "Enter new server password. Leave blank to cancel, input 'none' to disable password.", "Server security", "none"))
var/pass = reject_bad_text(input(usr, "Enter new server password. Leave blank to cancel, input 'none' to disable password.", "Server security", "none"))
if(!pass)
return
if(pass == "none")