Re: include bug in 5.3
| From: | Hannes Magnusson | Date: | Tue, 12 Aug 2008 07:21:30 +0000 |
| Subject: | Re: include bug in 5.3 | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-39861@lists.php.net to get a copy of this message | ||
On Mon, Aug 11, 2008 at 23:41, Greg Beaver <greg@chiaraquartet.net> wrote:
> Dmitry Stogov wrote:
>>
>> This behavior is already implemented in "improved" patch that I sent on
>> Saturday.
>>
>> Thanks. Dmitry.
>
> [snip]
>
>>>> What I mean is:
>>>>
>>>> fopen("this_is_not_a_dir_but_a_file/../../../../../../../../etc/passwd",
>>>> "r");
>>>>
>>>> works because of realpath() and PHP's wrapper.
>
> [snip]
>
> Does this change affect code like:
>
> include "../file.php";
I was thinking along the same line. I bet some people have been lazy
and used __FILE__. "/../../foobar.php".
But then again, maybe they deserve to be punished :)
-Hannes