#35071 [Opn->Csd]: Safe mode restrictions: "rb+" should be "wb+"
| From: | sniper@php.net | Date: | Thu, 03 Nov 2005 20:21:11 +0000 |
| Subject: | #35071 [Opn->Csd]: Safe mode restrictions: "rb+" should be "wb+" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-87500@lists.php.net to get a copy of this message | ||
ID: 35071
Updated by: sniper@php.net
Reported By: webmaster at iksaif dot net
-Status: Open
+Status: Closed
Bug Type: GD related
Operating System: *
PHP Version: 4.4.1
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2005-11-02 22:28:05] sniper@php.net
Fixed in HEAD and PHP_5_1 branches.
------------------------------------------------------------------------
[2005-11-02 21:25:19] moron at industrial dot org
This is the same issue covered in bug #35060 (though you do suggest a
potential fix). sniper@php.net claims this is a documentation problem,
not a bug.
------------------------------------------------------------------------
[2005-11-02 21:04:17] webmaster at iksaif dot net
Description:
------------
in ext/gd.c ext/gd_ctx.c
(PG(safe_mode) && !php_checkuid(fn, "rb+",
CHECKUID_CHECK_FILE_AND_DIR)))
should be :
(PG(safe_mode) && !php_checkuid(fn, "wb+",
CHECKUID_CHECK_FILE_AND_DIR)))
because with "rb+" it's impossible to create a new file
with imagepng,imagejpeg, etc ....
("r" change mode from CHECKUID_CHECK_FILE_AND_DIR to
CHECKUID_DISALLOW_FILE_NOT_EXISTS).
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35071&edit=1