From: virus at tgu dot ru Operating system: PHP version: 4CVS-2005-11-15 (snap) PHP Bug Type: GD related Bug description: Wrong fopen mode used in GD safe-mode checks
Description: ------------ Bug #35071 doesn't seem to be fixed in CVS. (We still have !php_checkuid(filename, "rb+", CHECKUID_CHECK_FILE_AND_DIR) in php_gd.h) Bug #35060 is still reproduceable. Reproduce code: --------------- <?php // safe_mode is enabled $img_out=imagecreatetruecolor(200,200); imagejpeg($img_out,'files/thingy/test.jpg',100); imagedestroy($img_out); ?> Expected result: ---------------- new image created "files/thingy/test.jpg" Actual result: -------------- Warning: imagejpeg(): Unable to access files/thingy/test.jpg in /home/moron/www/test.php on line 3 Warning: imagejpeg(): Invalid filename 'files/thingy/test.jpg' in /home/moron/www/test.php on line 3 -- Edit bug report at http://bugs.php.net/?id=35225&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35225&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35225&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35225&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=35225&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35225&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35225&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35225&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35225&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35225&r=support Expected behavior: http://bugs.php.net/fix.php?id=35225&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35225&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35225&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35225&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35225&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35225&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35225&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35225&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35225&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35225&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35225&r=mysqlcfg