#33349 [Opn->Bgs]: imap_fetchstructure() hangs on some mails
| From: | iliaa@php.net | Date: | Wed, 07 Sep 2005 02:24:49 +0000 |
| Subject: | #33349 [Opn->Bgs]: imap_fetchstructure() hangs on some mails | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84596@lists.php.net to get a copy of this message | ||
ID: 33349
Updated by: iliaa@php.net
Reported By: benjamin dot malynovytch at libertic dot fr
-Status: Open
+Status: Bogus
Bug Type: IMAP related
Operating System: *
PHP Version: 5CVS-2005-06-20
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 problem lies in the c-client lib that does not handle improperly
formatted multi-part e-mails without valid terminators.
Previous Comments:
------------------------------------------------------------------------
[2005-06-20 16:01:42] root at ka-rel dot cz
I'm experiencing the same behaviour with certain messages (mostly spam
but not always). A sample message is located at
http://ka-rel.cz/imap/bad001.tmp.
Whenever imap_fetchstructure function tries to analyze the message, cpu
gets to 100% and hangs (on NT 4.0 Server) or displays the "crash
message" (on WinXP), requesting to send it to Microsoft.
Till now, I've noticed that the bad messages have improperly set
boundary strings - maybe this confuses the function and results to
unability to parse individual parts of message. Also, such messages are
not decoded correctly if opened in a mail client.
PHP 4.3.3
IMAP c-Client Version 2001
WinXP: php_imap.dll, 593920 bytes, 24th August 2003
WinNT: php_imap.dll, 602112 bytes, 6th June 2005
------------------------------------------------------------------------
[2005-06-20 15:11:36] benjamin dot malynovytch at libertic dot fr
iliaa and sniper, you'll find the asked informations in your
mailboxes.
Is it possible that php5 doesn't work properly, when php4 does ?
It tried the application on an "old" box, using php4(4.3.4), and it
works fine (even on the message-of-death).
I haven't tried out on the production box though, cause I can't swap so
easily on php4 (other applications will dropp).
I also noticed, that a similar bug had been corrected in php 4.0.4
(imap_fetchstructure crashing) (Changelog). Is it possible that php5
has the same bug again ?
------------------------------------------------------------------------
[2005-06-20 11:54:59] sniper@php.net
We're interested in the 'message-of-death' only. Just export that
message and put it online or send via email to iliaa@php.net and
sniper@php.net.
Your initial example script is a bit odd though,
what EXACTLY (for real!) is $mbox_path set to?
------------------------------------------------------------------------
[2005-06-20 09:51:13] benjamin dot malynovytch at libertic dot fr
I tried several versions of imap (UW): imap-2001a, imap-2002a,
imap-2004a, imap-2004d, imap-2004e-DEVEL
None of them worked.
I'm afraid their's no error log: the application hangs without
returning anything (would be too easy to debug).
The only thing I know, is that the application hangs just after the
call to "imap_fetchstructure" (did some echo "..."; flush(); to be
sure).
Any idea ?
------------------------------------------------------------------------
[2005-06-18 00:45:26] iliaa@php.net
If the problem persists, please provide a URL to the complete text of
the message that causes the hang.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/33349
--
Edit this bug report at http://bugs.php.net/?id=33349&edit=1