Aleksander Machniak
2012-12-12 bb5d7282855dd83ccdd211cb77d0776dce71468e
Use also Envelope-To for identity selection (#1488553)
3 files modified
13 ■■■■■ changed files
CHANGELOG 2 ●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_storage.php 1 ●●●● patch | view | raw | blame | history
program/steps/mail/compose.inc 10 ●●●●● patch | view | raw | blame | history
CHANGELOG
@@ -8,7 +8,7 @@
- Fix broken message/part bodies when FETCH response contains more untagged lines (#1488836)
- Fix empty email on identities list after identity update (#1488834)
- Add new identities_level: (4) one identity with possibility to edit only signature
- Use Delivered-To header as a last resort for identity selection (#1488840)
- Use Delivered-To and Envelope-To headers for identity selection (#1488840, #1488553)
- Fix XSS vulnerability using Flash files (#1488828)
- Fix absolute positioning in HTML messages (#1488819)
- Fix cache (in)validation after setting \Deleted flag
program/lib/Roundcube/rcube_storage.php
@@ -65,6 +65,7 @@
        'MAIL-REPLY-TO',
        'RETURN-PATH',
        'DELIVERED-TO',
        'ENVELOPE-TO',
    );
    const UNKNOWN       = 0;
program/steps/mail/compose.inc
@@ -455,6 +455,16 @@
    }
  }
  // Fallback using Envelope-To
  if ($from_idx === null && ($envelope_to = $MESSAGE->headers->others['envelope-to'])) {
    foreach ($identities as $idx => $ident) {
      if (in_array($ident['email_ascii'], (array)$envelope_to)) {
        $from_idx = $idx;
        break;
      }
    }
  }
  return $identities[$from_idx !== null ? $from_idx : $default_identity];
}