Security tip i found

Ask about a PHP problem here.
Post Reply
bowersbros
Posts: 534
Joined: Thu May 05, 2011 8:19 pm

Security tip i found

Post by bowersbros »

Whilst looking around the internet at other peoples code, I noticed something like this:

$username = array_map('strip_tags',$_POST['username']);
After looking at what it does, it basically will do the same as magic_quotes_gpc() however, without the need to check whether magic quotes is on or off.

Just thought you'd like to know :)
I don't like to brag, but I wasn't circumcised. I was circumnavigated. ;)

Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Security tip i found

Post by jacek »

That will apply the strip_tags function to every elements in the $_POST['username'] array (which is not an array, is it ?)

:?
Image
Post Reply