Summary | IMP dies on bad date headers |
Queue | IMP |
Queue Version | 6.1.7 |
Type | Bug |
State | Not A Bug |
Priority | 1. Low |
Owners | |
Requester | bra (at) fsn (dot) hu |
Created | 07/31/2014 (3987 days ago) |
Due | |
Updated | 08/02/2014 (3985 days ago) |
Assigned | 07/31/2014 (3987 days ago) |
Resolved | 08/02/2014 (3985 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
Horde_Imap_Client 2.22.0+.
State ⇒ Not A Bug
Horde_Imap_Client 2.22.0+.
than a Horde_Imap_Client_DateTime object.
Considering that we catch/fix precisely the broken date headers you
report in Horde_Imap_Client, I'm wondering if you happen to be using
PHP 5.4.29, 5.5.13, or 5.6?
PHP 5.5.13 (cli) (built: Jun 10 2014 15:36:46)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend
Technologies
Could you please help in narrowing down this issue?
Maybe with a sample code, which can be fed with a text input and does
the same like Horde.
State ⇒ Feedback
Priority ⇒ 1. Low
a Horde_Imap_Client_DateTime object.
Considering that we catch/fix precisely the broken date headers you
report in Horde_Imap_Client, I'm wondering if you happen to be using
PHP 5.4.29, 5.5.13, or 5.6?
imp/lib/Ajax/Application/ShowMessage.php and this loop:
/* Build the rest of the headers. */
foreach ($headers_list as $head => $str) {
if ($val = $mime_headers->getValue($head)) {
if ($head == 'date') {
/* Add local time to date header. */
$val =
htmlspecialchars($imp_ui->getLocalTime($this->_envelope->date));
$this->_envelope->date here is an empty string on bad date headers,
that's where getLocalTime dies.
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ IMP dies on bad date headers
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
complains about not being able to read his mails.
When he tries to access some of them, he gets server communication error.
The following are in the logs:
Jul 31 16:47:26 wm Webmail: [imp] PHP ERROR: strftime() expects
parameter 2 to be long, string given [pid 79051 on line 178 of
"/usr/local/www/webmail/web/imp/lib/Message/Ui.php"]
Jul 31 16:47:26 wm Webmail: PHP Fatal error: Call to a member
function format() on a non-object in
/usr/local/www/webmail/web/imp/lib/Message/Ui.php on line 181
Putting some debug syslogs around this code it seems
$this->_envelope->date becomes an empty string when the date header is
invalid.
Two examples from the user's folder:
Date: Tue, 22 Oct 2013 19:02:07 +0200 (GMT+02:00)
Date: Wed, 02 Jul 2014 05:18:27 UT
If I correct these headers to be RFC conform, the messages can be read.
Thunderbird and other clients can show these correctly.