Security updates

This commit is contained in:
bergware
2021-08-13 15:11:40 +02:00
parent d1c227b476
commit feae745f81
31 changed files with 155 additions and 139 deletions
+5 -5
View File
@@ -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));
}
?>