PDA

View Full Version : Input validation


ScratchMonkey
31-10-2003, 21:39
Just had a user tearing his hair out because he was entering the quotes from my post as part of an IP:port entry, ie. 'matureasskickers.net:8769'. TS was reporting socket error 11004 because it was trying to parse the quotes as part of the input.

Would it make sense to check for quotes and maybe spaces and tabs on either side of any input and deleting them before passing the input to the underlying API's? This might help a lot of non-programmers getting connection info from forum posts who otherwise would be getting a very cryptic error message.

If you're passing this data to a Hawk API, maybe they should check for this so other apps can benefit.

Peter
01-11-2003, 11:05
Yeah, would be a good idea. Also while at it allow teamspeak urls in the connect too. Some guys try and paste those to connect.