Aleksander Machniak
2012-12-04 9019025222470462ea075560c287af4f260cdd8f
- Fix XSS vulnerability in vbscript: and data:text links handling (#1488850)

Conflicts:

CHANGELOG
tests/MailFunc.php
2 files modified
3 ■■■■ changed files
CHANGELOG 1 ●●●● patch | view | raw | blame | history
program/lib/washtml.php 2 ●●● patch | view | raw | blame | history
CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Fix XSS vulnerability in vbscript: and data:text links handling (#1488850)
- Fix absolute positioning in HTML messages (#1488819)
- Fix keybord events on messages list in opera browser (#1488823)
- Fix cache (in)validation after setting \Deleted flag
program/lib/washtml.php
@@ -214,7 +214,7 @@
      $key = strtolower($key);
      $value = $node->getAttribute($key);
      if (isset($this->_html_attribs[$key]) ||
         ($key == 'href' && !preg_match('!^javascript!i', $value)
         ($key == 'href' && !preg_match('!^(javascript|vbscript|data:text)!i', $value)
           && preg_match('!^([a-z][a-z0-9.+-]+:|//|#).+!i', $value))
      ) {
        $t .= ' ' . $key . '="' . htmlspecialchars($value, ENT_QUOTES) . '"';