From: z...@php.net Operating system: Windows and Linux PHP version: 5.3.0alpha3 PHP Bug Type: Scripting Engine problem Bug description: Options are not checked in /ext/imap
Description: ------------ This is essentially the same problem as described in #46731 and #46837. The values of options passed to imap functions are not checked precisely. Patches for: imap_body(),imap_fetchstructure(),imap_fetchbody(),imap_fetchheader() Are here: http://www.pastebin.ca/1286942 http://www.pastebin.ca/1286943 http://www.pastebin.ca/1286944 I have also fixed missing initialisation of flags in fetchheader() in PHP53 and PHP6. Reproduce code: --------------- Test cases here http://www.pastebin.ca/1286945 http://www.pastebin.ca/1286947 http://www.pastebin.ca/1286948 http://www.pastebin.ca/1286949 Expected result: ---------------- As shown in test cases Actual result: -------------- PHP_INT_MAX is accepted as a valid option. -- Edit bug report at http://bugs.php.net/?id=46884&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46884&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46884&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46884&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46884&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46884&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46884&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46884&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46884&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46884&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46884&r=support Expected behavior: http://bugs.php.net/fix.php?id=46884&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46884&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46884&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46884&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46884&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46884&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46884&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46884&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46884&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46884&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46884&r=mysqlcfg