#35071 [Com]: Safe mode restrictions: "rb+" should be "wb+"

From: Date: Wed, 02 Nov 2005 20:25:20 +0000
Subject: #35071 [Com]: Safe mode restrictions: "rb+" should be "wb+"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-87434@lists.php.net to get a copy of this message
ID: 35071 Comment by: moron at industrial dot org Reported By: webmaster at iksaif dot net Status: Open Bug Type: GD related Operating System: All PHP Version: 4.4.1 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#87434) next »