From: Operating system: Linux PHP version: 5.3.2 Package: IMAP related Bug Type: Bug Bug description:imap_open() improperly trimming spaces from username
Description: ------------ Per RFC 3501 [9], spaces are valid characters in a username. Thus, 'username' != ' username '. However, imap_open() appears to be stripping leading/trailing whitespace from the username. Test script: --------------- <?php $mailbox = '{localhost:143}INBOX'; // 'username' is valid user; ' username ' is invalid user $username = ' username '; $password = 'password'; $res = imap_open($mailbox, $username, $password, OP_HALFOPEN); if (is_resource($res)) { print "SUCCESS\n"; } else { print "FAILED\n"; } Expected result: ---------------- FAILED Actual result: -------------- SUCCESS -- Edit bug report at http://bugs.php.net/bug.php?id=51708&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51708&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51708&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51708&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51708&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51708&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51708&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51708&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51708&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51708&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51708&r=support Expected behavior: http://bugs.php.net/fix.php?id=51708&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51708&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51708&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51708&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51708&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=51708&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51708&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51708&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51708&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51708&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51708&r=mysqlcfg