Fix XSS issue in handling of a style tag inside of an svg element

This commit is contained in:
Aleksander Machniak
2017-03-09 11:45:22 +01:00
parent 8953c7a257
commit b59ff5cafb
2 changed files with 2 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ CHANGELOG Roundcube Webmail
- Managesieve: Fix parser issue with empty lines between comments (#5657)
- Managesieve: Fix possible defect in handling \r\n in scripts (#5685)
- Fix/rephrase "unsaved changes" warning when cancelling a draft (#5610)
- Fix XSS issue in handling of a style tag inside of an svg element
RELEASE 1.3-beta
----------------

View File

@@ -494,6 +494,7 @@ class rcube_utils
public static function xss_entity_decode($content)
{
$out = html_entity_decode(html_entity_decode($content));
$out = strip_tags($out);
$out = preg_replace_callback('/\\\([0-9a-f]{4})/i',
array(self, 'xss_entity_decode_callback'), $out);
$out = preg_replace('#/\*.*\*/#Ums', '', $out);