|
|
|
@ -1441,9 +1441,10 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null,
|
|
|
|
|
$name = $part['name'];
|
|
|
|
|
$mailto = $part['mailto'];
|
|
|
|
|
$string = $part['string'];
|
|
|
|
|
$valid = check_email($mailto, false);
|
|
|
|
|
|
|
|
|
|
// phishing email prevention (#1488981), e.g. "valid@email.addr <phishing@email.addr>"
|
|
|
|
|
if ($name && $name != $mailto && strpos($name, '@')) {
|
|
|
|
|
if ($name && $valid && $name != $mailto && strpos($name, '@')) {
|
|
|
|
|
$name = '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1459,7 +1460,7 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null,
|
|
|
|
|
// for printing we display all addresses
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
else if (check_email($part['mailto'], false)) {
|
|
|
|
|
else if ($valid) {
|
|
|
|
|
if ($linked) {
|
|
|
|
|
$address = html::a(array(
|
|
|
|
|
'href' => 'mailto:'.$mailto,
|
|
|
|
@ -1492,7 +1493,7 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null,
|
|
|
|
|
if ($name)
|
|
|
|
|
$address .= Q($name);
|
|
|
|
|
if ($mailto)
|
|
|
|
|
$address .= (strlen($address) ? ' ' : '') . sprintf('<%s>', Q($mailto));
|
|
|
|
|
$address = trim($address . ' ' . Q($name ? sprintf('<%s>', $mailto) : $mailto));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$address = html::span('adr', $address);
|
|
|
|
|