mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-21 18:36:31 +00:00
[security] prevent xml injection and executing switch api cmds (#6594)
This commit is contained in:
16
resources/classes/xml.php
Normal file
16
resources/classes/xml.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
if (!class_exists('xml')) {
|
||||
class xml {
|
||||
|
||||
/**
|
||||
* Escapes xml special characters to html entities and sanitze switch special chars.
|
||||
*/
|
||||
static function sanitize($string) {
|
||||
return str_replace('$', '', htmlspecialchars($string, ENT_XML1));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user