Enhanced dockerMan Security

This commit is contained in:
Andrew Z
2020-02-23 12:15:58 -05:00
parent 6933c870b7
commit dd2ad86e46
2 changed files with 6 additions and 3 deletions

View File

@@ -245,7 +245,7 @@ function xmlSecurity(&$template) {
$tempElement = htmlspecialchars_decode($element);
$tempElement = str_replace("[","<",$tempElement);
$tempElement = str_replace("]",">",$tempElement);
if (preg_match('#<script(.*?)>(.*?)</script>#is',$tempElement) || preg_match('#<iframe(.*?)>(.*?)</iframe>#is',$tempElement)) {
if (preg_match('#<script(.*?)>(.*?)</script>#is',$tempElement) || preg_match('#<iframe(.*?)>(.*?)</iframe>#is',$tempElement) || (stripos($tempElement,"<link") !== false) ) {
$element = "REMOVED";
}
}