[prev in list] [next in list] [prev in thread] [next in thread]
List: squirrelmail-cvs
Subject: [SM-CVS] SF.net SVN: squirrelmail: [12421]
From: kink () users ! sourceforge ! net
Date: 2007-05-29 15:22:28
Message-ID: E1Ht3Wm-0006Xb-Fj () sc8-pr-svn2 ! sourceforge ! net
[Download RAW message or body]
Revision: 12421
http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=12421&view=rev
Author: kink
Date: 2007-05-29 08:22:28 -0700 (Tue, 29 May 2007)
Log Message:
-----------
work around broken mailers sending broken date headers without
a space after the day name (e.g. "Tue,23").
Modified Paths:
--------------
branches/SM-1_4-STABLE/squirrelmail/ChangeLog
branches/SM-1_4-STABLE/squirrelmail/functions/date.php
Modified: branches/SM-1_4-STABLE/squirrelmail/ChangeLog
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/ChangeLog 2007-05-19 22:14:58 UTC (rev 12420)
+++ branches/SM-1_4-STABLE/squirrelmail/ChangeLog 2007-05-29 15:22:28 UTC (rev 12421)
@@ -5,6 +5,8 @@
Version 1.4.11 - SVN
--------------------
- Fix display of X-Priority in message view.
+ - Work around mailers sending broken Date headers with no space after the
+ first comma.
Version 1.4.10a - 10 May 2007
-----------------------------
Modified: branches/SM-1_4-STABLE/squirrelmail/functions/date.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/date.php 2007-05-19 22:14:58 UTC \
(rev 12420)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/date.php 2007-05-29 15:22:28 UTC \
(rev 12421) @@ -405,19 +405,24 @@
** In that case, dateParts[0] would be the <day of month>
** and everything would be bumped up one.
**/
+ if (count($dateParts) <2) {
+ return -1;
+ }
/*
* Simply check to see if the first element in the dateParts
* array is an integer or not.
* Since the day of week is optional, this check is needed.
*/
- if (count($dateParts) <2) {
- return -1;
- }
-
- /* remove day of week */
if (!is_numeric(trim($dateParts[0]))) {
- $dataParts = array_shift($dateParts);
+ /* cope with broken mailers that send "Tue,23" without space */
+ if ( preg_match ('/^\w+,(\d{1,2})$/', $dateParts[0], $match) ) {
+ /* replace Tue,23 with 23 */
+ $dateParts[0] = $match[1];
+ } else {
+ /* just drop the day of the week */
+ array_shift($dateParts);
+ }
}
/* calculate timestamp separated from the zone and obs-zone */
$stamp = strtotime(implode (' ', array_splice ($dateParts,0,4)));
@@ -448,4 +453,3 @@
return ($mtime);
}
*/
-?>
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
--
squirrelmail-cvs mailing list
List Address: squirrelmail-cvs@lists.sourceforge.net
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
http://squirrelmail.org/cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic