From: <pdo...@us...> - 2021-08-10 06:41:37
|
Revision: 14925 http://sourceforge.net/p/squirrelmail/code/14925 Author: pdontthink Date: 2021-08-10 06:41:30 +0000 (Tue, 10 Aug 2021) Log Message: ----------- Minor, rare bug fix: Properly reduce multiple spaces in date headers Modified Paths: -------------- trunk/squirrelmail/functions/imap_messages.php Modified: trunk/squirrelmail/functions/imap_messages.php =================================================================== --- trunk/squirrelmail/functions/imap_messages.php 2021-08-10 06:40:54 UTC (rev 14924) +++ trunk/squirrelmail/functions/imap_messages.php 2021-08-10 06:41:30 UTC (rev 14925) @@ -710,7 +710,7 @@ case 'BODYSTRUCTURE': break; // to be implemented, moving imap code out of the Message class case 'INTERNALDATE': - $aMsg['INTERNALDATE'] = trim(str_replace(' ', ' ',parseString($read,$i))); + $aMsg['INTERNALDATE'] = trim(preg_replace('/\s+/', ' ',parseString($read,$i))); break; case 'BODY.PEEK[HEADER.FIELDS': case 'BODY[HEADER.FIELDS': @@ -731,7 +731,7 @@ $value = trim(substr($line, $pos+1)); switch($field) { case 'date': - $aMsg['date'] = trim(str_replace(' ', ' ', $value)); + $aMsg['date'] = trim(preg_replace('/\s+/', ' ', $value)); break; case 'x-priority': $aMsg['x-priority'] = ($value) ? (int) $value[0] : 3; break; case 'priority': This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |