Aleksander Machniak
2013-05-31 af9dbd54b30ce162a401f77f571c65bd9895d0db
Fix PHP warning when responding to a message with many Return-Path headers (#1489136)
2 files modified
10 ■■■■ changed files
CHANGELOG 1 ●●●● patch | view | raw | blame | history
program/steps/mail/func.inc 9 ●●●●● patch | view | raw | blame | history
CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Fix PHP warning when responding to a message with many Return-Path headers (#1489136)
- Added user preference to open all popups as standard windows
- Fix unintentional compose window resize (#1489114)
- Fix performance regression in text wrapping function (#1489133)
program/steps/mail/func.inc
@@ -1786,9 +1786,12 @@
    // Try Return-Path
    if ($from_idx === null && ($return_path = $MESSAGE->headers->others['return-path'])) {
        foreach ($identities as $idx => $ident) {
            if (strpos($return_path, str_replace('@', '=', $ident['email_ascii']).'@') !== false) {
                $from_idx = $idx;
                break;
            $ident = str_replace('@', '=', $ident['email_ascii']) . '@';
            foreach ((array)$return_path as $path) {
                if (strpos($path, $ident) !== false) {
                    $from_idx = $idx;
                    break 2;
                }
            }
        }
    }