mirror of
https://github.com/unraid/webgui.git
synced 2026-05-01 23:39:21 -05:00
Security updates
This commit is contained in:
@@ -11,16 +11,16 @@
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
// remove malicious script elements
|
||||
// remove malicious code appended after variable assignment
|
||||
function unscript($text) {
|
||||
return preg_replace('#<script(.*?)>(.+?)</script>#','',html_entity_decode($text));
|
||||
return trim(explode(';',html_entity_decode($text))[0]);
|
||||
}
|
||||
// remove malicious code appended after string variable
|
||||
function unhook($text) {
|
||||
return preg_replace("/['\"](.*)?['\"];?.+$/",'',html_entity_decode($text));
|
||||
}
|
||||
// remove malicious code appended after variable assignment
|
||||
function unbind($text) {
|
||||
return trim(explode(';',html_entity_decode($text))[0]);
|
||||
// remove malicious script elements
|
||||
function uncode($text) {
|
||||
return preg_replace('#<script(.*?)>(.+?)</script>#','',html_entity_decode($text));
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user