stumpy Posted December 23, 2003 Report Share Posted December 23, 2003 Hi, anyone have a php snippet for removing malicious characters in user input? Thanks, SD. Link to comment Share on other sites More sharing options...
Guest Posted December 23, 2003 Report Share Posted December 23, 2003 Try a couple of these sites, they have scripts on there: www.phpfreaks.com www.scriptsearch.com www.phpbuilder.com Link to comment Share on other sites More sharing options...
stumpy Posted December 24, 2003 Author Report Share Posted December 24, 2003 Thanks, I was hoping one of the PHP gurus might post what they use for reading user input and removing bad characters. Link to comment Share on other sites More sharing options...
khunsanuk Posted December 24, 2003 Report Share Posted December 24, 2003 Hi, Have a look at the addslashes command, I think this would be useful for starters. Sanuk! Link to comment Share on other sites More sharing options...
stumpy Posted December 24, 2003 Author Report Share Posted December 24, 2003 Thanks. All my experience is with Perl and I had a nice little routine to read user input into a hash and remove any bad characters. I would then do furhter test on individual variable according to what they should be, e.g. is it a valid syntax for an email address. I was looking for something similar in php (I have an email checking regex) Secondly, do you all turn register globals off and how big a security problem do you see them as? Thanks, SD. Link to comment Share on other sites More sharing options...
khunsanuk Posted December 25, 2003 Report Share Posted December 25, 2003 Hi, "Secondly, do you all turn register globals off and how big a security problem do you see them as?" Must admit that you lost me here. Sanuk! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.