Bug #66184 [NEW]: Executing of imap_fetchstructure() cause server connection crash
| From: | wniestolik at betasoft dot pl | Date: | Wed, 27 Nov 2013 15:19:12 +0000 |
| Subject: | Bug #66184 [NEW]: Executing of imap_fetchstructure() cause server connection crash | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-182964@lists.php.net to get a copy of this message | ||
From: wniestolik at betasoft dot pl
Operating system: Windows/Linux
PHP version: 5.4.22
Package: IMAP related
Bug Type: Bug
Bug description:Executing of imap_fetchstructure() cause server connection crash
Description:
------------
imap_fetchstructure method sends to server folowing query:
FETCH 375 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (Newsgroups Content-MD5
Content-Disposition Content-Language Content-Location Followup-To
References)] BODYSTRUCTURE INTERNALDATE RFC822.SIZE FLAGS)
Problem is, that the generated query has double space in 'References)]
BODYSTRUCTURE'. Many servers (eg. Exchange) after receive that query
close connection immediately with message 'IMAP protocol error'.
It seems, that there's no possibility to prevent this other than update
IMAP library. So, for servers with strict IMAP protocol parser, method
imap_fetchstructure is completely useless. Please help!
---
From manual page: http://www.php.net/function.imap-fetchstructure
---
Test script:
---------------
Just execute imap_fetchstructure() on any email account and capture
generated query.
Expected result:
----------------
Execution of imap_fetchstructure sends correct IMAP query without
redundant white spaces.
Actual result:
--------------
Execution of imap_fetchstructure sends incorrect IMAP query with
redundant white spaces.
--
Edit bug report at https://bugs.php.net/bug.php?id=66184&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66184&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66184&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66184&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66184&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66184&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66184&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66184&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66184&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66184&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66184&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66184&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66184&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66184&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66184&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66184&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66184&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66184&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66184&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66184&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66184&r=mysqlcfg