diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-12-04 09:17:08 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-12-04 09:17:08 +0100 |
commit | 74cd0a9b62f11bc07c5a1d3ba0098b54883eb0ba (patch) | |
tree | 005192c324221b18ed83994de18c10b14ec42eff /program/lib/washtml.php | |
parent | 0fa54df638a0b0f514d1bfba3cefb93e38991a35 (diff) |
- Fix XSS vulnerability in vbscript: and data:text links handling (#1488850)
Diffstat (limited to 'program/lib/washtml.php')
-rw-r--r-- | program/lib/washtml.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/program/lib/washtml.php b/program/lib/washtml.php index 0d4ffdb4b..d13d66404 100644 --- a/program/lib/washtml.php +++ b/program/lib/washtml.php @@ -214,7 +214,7 @@ class washtml $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) . '"'; |