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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: eugen at iwep dot ab dot ru
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Fri Mar 14 15:01:30 2025 UTC