php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24304 fopen SAFE faile
Submitted: 2003-06-23 19:59 UTC Modified: 2003-06-23 21:55 UTC
From: eugen at iwep dot ab dot ru Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.3.2 OS: FreeBSD
Private report: No CVE-ID: None
 [2003-06-23 19:59 UTC] eugen at iwep dot ab dot ru
Description:
------------
I found bug? if i use SAFE MODE and function fopen I may show other document diferent user, make rwxrw-rw attribute on public_html home directrory

User1 
public_html rwxrw-rw-
cack.php
$data="";M
$fp=fopen("../../User2/public_html/index.php","r");M
while(!feof($fp)){M
        $data.=fread($fp,1024);
}M
fclose($fp);M
highlight_string($data);M

User2
public_html rwxr-xr-x
index.php

Reproduce code:
---------------
<?
$data="";M
$fp=fopen("../../User2/public_html/index.php","r");M
while(!feof($fp)){M
        $data.=fread($fp,1024);
}M
fclose($fp);M
highlight_string($data);M
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-23 21:55 UTC] sniper@php.net
Check your php.ini options, can't reproduce.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 20:01:45 2024 UTC