safemode, php_stream_open_wrapper does not respect REPORT_ERRORS
| From: | Pierre | Date: | Tue, 20 Mar 2007 21:08:49 +0000 |
| Subject: | safemode, php_stream_open_wrapper does not respect REPORT_ERRORS | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-28500@lists.php.net to get a copy of this message | ||
Hi,
While fixing PECL Bug #10426, we found that php_checkuid_ex forces
CHECKUID_DISALLOW_FILE_NOT_EXISTS in read mode.
As php_stream_open_wrapper uses this functions, it is not possible to
call it using a non existing file without getting a warning when
safe_mode is On.
The related code is main/safemode.c:70 :
if (fopen_mode) {
if (fopen_mode[0] == 'r') {
mode = CHECKUID_DISALLOW_FILE_NOT_EXISTS;
} else {
mode = CHECKUID_CHECK_FILE_AND_DIR;
}
}
Any reason behind this check or should we drop it?
Thanks,
--Pierre