diff --git a/pandora_console/mobile/include/system.class.php b/pandora_console/mobile/include/system.class.php index 4c98ee9f63..3e4c56930a 100644 --- a/pandora_console/mobile/include/system.class.php +++ b/pandora_console/mobile/include/system.class.php @@ -32,6 +32,9 @@ class System { } $this->session = $_SESSION; session_write_close(); + + require_once($this->getConfig('homedir') . '/include/functions.php'); + require_once($this->getConfig('homedir') . '/include/functions_io.php'); } public static function getInstance() { @@ -51,29 +54,14 @@ class System { } public function getRequest($name, $default = null) { - $return = $default; - - if (isset($_POST[$name])) { - $return = $_POST[$name]; - } - else { - if (isset($_GET[$name])) { - $return = $_GET[$name]; - } - } - - return $return; + return get_parameter($name, $default); } public function safeOutput($value) { - require_once($this->getConfig('homedir') . '/include/functions_io.php'); - return io_safe_output($value); } public function safeInput($value) { - require_once($this->getConfig('homedir') . '/include/functions_io.php'); - return io_safe_input($value); } diff --git a/pandora_console/mobile/include/user.class.php b/pandora_console/mobile/include/user.class.php index 2c22a355e7..cf5dcfea11 100644 --- a/pandora_console/mobile/include/user.class.php +++ b/pandora_console/mobile/include/user.class.php @@ -74,7 +74,6 @@ class User { if (($user == null) && ($password == null)) { $user = $system->getRequest('user', null); - $user = $system->safeInput($user); $password = $system->getRequest('password', null); } @@ -141,6 +140,7 @@ class User { } if (empty($code)) { $code = $system->getRequest('auth_code', null); + $code = $system->safeOutput($code); } if (!empty($user) && !empty($code)) { diff --git a/pandora_console/mobile/operation/tactical.php b/pandora_console/mobile/operation/tactical.php index e1e6118ea4..d622642112 100755 --- a/pandora_console/mobile/operation/tactical.php +++ b/pandora_console/mobile/operation/tactical.php @@ -49,7 +49,9 @@ class Tactical { switch ($parameter2) { case 'render_status_pie': $links = $system->getRequest('links', ''); + $links = $system->safeOutput($links); $data = $system->getRequest('data', ''); + $data = $system->safeOutput($data); $data = str_replace('\\','',$data); $links = str_replace('\\','',$links); $width = $system->getRequest('width', 230);