diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index 3be37f9b5..04e23a32e 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -2745,6 +2745,13 @@ class e_parse extends e_parser { $this->staticCount++; // increment counter. + $ext = pathinfo($url, PATHINFO_EXTENSION); + + if($ext === 'svg') + { + return $this->replaceConstants($url, 'abs'); + } + if(strpos($url,"{e_") === 0) // Fix for broken links that use {e_MEDIA} etc. { //$url = $this->replaceConstants($url,'abs'); @@ -2766,6 +2773,8 @@ class e_parse extends e_parser } + + if(strstr($url,e_MEDIA) || strstr($url,e_SYSTEM)) // prevent disclosure of 'hashed' path. { @@ -4375,7 +4384,7 @@ class e_parser $path = null; $file = trim($file); $ext = pathinfo($file, PATHINFO_EXTENSION); - $accepted = array('jpg','gif','png','jpeg'); + $accepted = array('jpg','gif','png','jpeg', 'svg'); if(!in_array($ext,$accepted))