|
Posted by j1mb0jay on 01/11/08 23:21
Rik Wasmus wrote:
> On Fri, 11 Jan 2008 23:33:19 +0100, j1mb0jay <none@none.com> wrote:
>
>> Is there a function in PHP that will return a boolean if a String
>> contains another given String. As what I am trying to do is disallow
>> input that contains ../ or something else that would allow directory
>> traversal.
>
> strpos()/regex etc. could be used for this, however, I'd use realpath()
> on the results to check wether it's still 'safe'.
Did not think of the realpath() function.
Thank you.
j1mb0jay
Navigation:
[Reply to this message]
|