[Tickets #13409] Re: IMP dies on bad date headers
noreply at bugs.horde.org
noreply at bugs.horde.org
Thu Jul 31 15:07:40 UTC 2014
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/13409
------------------------------------------------------------------------------
Ticket | 13409
Updated By | bra at fsn.hu
Summary | IMP dies on bad date headers
Queue | IMP
Version | 6.1.7
Type | Bug
State | Unconfirmed
Priority | 3. High
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
bra at fsn.hu (2014-07-31 15:07) wrote:
> I have a user, converted from another mail application to Horde, who
> 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.
After reading my own message: "around this code" really means
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.
More information about the bugs
mailing list