Strip Slashes $_FILES

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Strip Slashes $_FILES

Post by nickvd »

Is running $_FILES thru stripslashes (or other input filtering scheme)?

I'm trying to muck around with PhotoStack and it's running $_FILES thru it, which is removing the path seperators in ['tmp_name']...

Would it be safe for me to just comment out the $_FILES processing? or would I be leaving the script open, and therefore be better off checking for $_FILES, or even just the 'tmp_name' key and skipping the stripslashes.
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Post by jayshields »

Why would you ever need to strip the slashes from anything in the $_FILES array?

I would just comment out the line like you said.
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

That's what I thought, and did comment it out (just to make sure i located the problem).. I'll leave it as is... thanks for the infoz!
Post Reply