mirror of
https://github.com/unraid/webgui.git
synced 2026-04-23 10:38:50 -05:00
Switch from tabs to spaces
This commit is contained in:
@@ -379,20 +379,20 @@ function xmlToVar($xml) {
|
||||
}
|
||||
|
||||
function xmlSecurity(&$template) {
|
||||
foreach ($template as &$element) {
|
||||
if ( is_array($element) ) {
|
||||
xmlSecurity($element);
|
||||
} else {
|
||||
if ( is_string($element) ) {
|
||||
$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) ) {
|
||||
$element = "REMOVED";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ($template as &$element) {
|
||||
if ( is_array($element) ) {
|
||||
xmlSecurity($element);
|
||||
} else {
|
||||
if ( is_string($element) ) {
|
||||
$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) ) {
|
||||
$element = "REMOVED";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function xmlToCommand($xml, $create_paths=false) {
|
||||
|
||||
Reference in New Issue
Block a user