Edit report at http://bugs.php.net/bug.php?id=51708&edit=1
ID: 51708 Updated by: il...@php.net Reported by: slusarz at curecanti dot org Summary: imap_open() improperly trimming spaces from username -Status: Open +Status: Bogus Type: Bug Package: IMAP related Operating System: Linux PHP Version: 5.3.2 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. The trimming (if it happens) is done by c-client lib, not PHP. Previous Comments: ------------------------------------------------------------------------ [2010-04-30 21:05:59] slusarz at curecanti dot org 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 this bug report at http://bugs.php.net/bug.php?id=51708&edit=1