Sanitized a large number of input()s.

- Hopefully this will cut down on the server spamming/crashing escapades happening on other servers. (This wont stop that from happening, this just makes it less severe)
- Some of the sanitizes were probably unnecessary, but better safe then sorry.

Added MAX_NAME_LEN constant which is initialized to 26.
- Please use MAX_NAME_LEN instead of typing in 26 when cutting inputs short. 26's are annoying when they have to be changed and you have to hunt through over a hundred files and tens of thousands of lines of code to find them all.

Moved uplink_kits.dm to code/game/objects/storage

Moved uplinks.dm to code/game/objects
- The stuff inside uplinks.dm could really be chopped up and split into separate dm files but this will do for now.


*********************************************************
**********************Important**************************
*********************************************************
When you create code that asks the user for an input consider whether or not it gets shown to the user through html or the like.

If it does please sanatize() or strip_html() it. Also use copytext() to cutoff spam by using MAX_NAME_LEN and MAX_MESSAGE_LEN as the cutoff var.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3652 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
johnsonmt88@gmail.com
2012-05-24 19:34:04 +00:00
parent 23c6a84c7c
commit fd529891ca
40 changed files with 627 additions and 156 deletions

View File

@@ -26,8 +26,7 @@
M << "\red You don't feel cool enough to name this gun, chump."
return 0
var/input = input("What do you want to name the gun?",,"")
input = sanitize(input)
var/input = copytext(sanitize(input("What do you want to name the gun?",,"")),1,MAX_NAME_LEN)
if(src && input && !M.stat && in_range(M,src))
name = input