- Fix XSS vulnerability in UI messages (#1488030)

release-0.6
alecpl 13 years ago
parent 2185899721
commit 8dd172a5b0

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Fix XSS vulnerability in UI messages (#1488030)
- Fix handling of email addresses with quoted local part (#1487939)
- Fix EOL character in vCard exports (#1487873)
- Added optional "multithreading" autocomplete feature

@ -174,8 +174,15 @@ class rcube_json_output
public function show_message($message, $type='notice', $vars=null, $override=true, $timeout=0)
{
if ($override || !$this->message) {
if (rcube_label_exists($message)) {
if (!empty($vars))
$vars = array_map('Q', $vars);
$msgtext = rcube_label(array('name' => $message, 'vars' => $vars));
}
else
$msgtext = $message;
$this->message = $message;
$msgtext = rcube_label_exists($message) ? rcube_label(array('name' => $message, 'vars' => $vars)) : $message;
$this->command('display_message', $msgtext, $type, $timeout * 1000);
}
}

@ -248,8 +248,15 @@ class rcube_template extends rcube_html_page
public function show_message($message, $type='notice', $vars=null, $override=true, $timeout=0)
{
if ($override || !$this->message) {
if (rcube_label_exists($message)) {
if (!empty($vars))
$vars = array_map('Q', $vars);
$msgtext = rcube_label(array('name' => $message, 'vars' => $vars));
}
else
$msgtext = $message;
$this->message = $message;
$msgtext = rcube_label_exists($message) ? rcube_label(array('name' => $message, 'vars' => $vars)) : $message;
$this->command('display_message', $msgtext, $type, $timeout * 1000);
}
}

Loading…
Cancel
Save