mirror of
https://github.com/unraid/webgui.git
synced 2026-05-02 15:59:35 -05:00
Security update
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<?
|
||||
// remove malicious code appended after variable assignment
|
||||
function unscript($text) {
|
||||
return trim(preg_split('/[;|&\?]/',untangle($text))[0]);
|
||||
return trim(preg_split('/[;|&\?=]/',untangle($text))[0]);
|
||||
}
|
||||
// remove malicious HTML elements
|
||||
function untangle($text) {
|
||||
@@ -21,6 +21,6 @@ function untangle($text) {
|
||||
}
|
||||
// remove malicious code appended after string variable
|
||||
function unhook($text) {
|
||||
return trim(preg_split('/[;|&\?]/',preg_replace(["#['\"](.*?)['\"];?.+$#","#[()\[\]/\\&]#"],'',html_entity_decode($text)))[0]);
|
||||
return trim(preg_split('/[;|&\?=]/',preg_replace(["#['\"](.*?)['\"];?.+$#","#[()\[\]/\\&]#"],'',html_entity_decode($text)))[0]);
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user