[PHP] Sane path? Avoiding people climbing in directory structure ../../

2002-05-20 Thread Jimmy Lantz
Hi, I'm planning on using userinput as a part of path to read (horrific I know :) So to make this userinput a bit more secure I'm thinking to use $path = escapeshellarg($path); $path = str_replace(../,,$path); I'm thinking to use a basedir in a constant something like /usr/home/userdir (this

Re: [PHP] Sane path? Avoiding people climbing in directory structure ../../

2002-05-20 Thread Bogdan Stancescu
Just to aknowledge that your post is being read: I think that's all you have to do - that obviously doesn't necessarily mean I'm also right. :-) Bogdan Jimmy Lantz wrote: Hi, I'm planning on using userinput as a part of path to read (horrific I know :) So to make this userinput a bit