X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=install%2Fisession.inc;h=339c92735549298cc0ba600595f651ca901eb813;hb=3b06c6c4718610a408cae2e9b76c3134ca30b84c;hp=25a5519c1f5eef284c3bd80d9625a2730c73ded5;hpb=e9782c04faf09dd040dbc0c908cdb6e6d4f0dcfc;p=fa-stable.git diff --git a/install/isession.inc b/install/isession.inc index 25a5519c..339c9273 100644 --- a/install/isession.inc +++ b/install/isession.inc @@ -39,6 +39,19 @@ function strip_quotes($data) return $data; } +function html_cleanup(&$parms) +{ + foreach($parms as $name => $value) { +// $value = @html_entity_decode($value, ENT_QUOTES, $_SESSION['language']->encoding); + if (is_array($value)) + html_cleanup($parms[$name]); + else + $parms[$name] = @htmlspecialchars($value, ENT_QUOTES, $_SESSION['language']->encoding); + } + reset($parms); // needed for direct key() usage later throughout the sources +} + + function check_page_security($page_security) { } @@ -57,7 +70,7 @@ include_once($path_to_root . "/includes/errors.inc"); set_error_handler('error_handler' /*, errtypes */); include_once($path_to_root . "/includes/current_user.inc"); -include_once($path_to_root . "/includes/lang/language.php"); +include_once($path_to_root . "/includes/lang/language.inc"); include_once($path_to_root . "/includes/ajax.inc"); include_once($path_to_root . "/includes/ui/ui_msgs.inc"); include_once($path_to_root . "/includes/prefs/sysprefs.inc"); @@ -83,7 +96,8 @@ $inst_langs = array( 'ka_GE' => array ( 'name' => 'Georgian','code' => 'ka_GE', 'encoding' => 'utf-8'), 'nl_BE' => array ( 'name' => 'Nederlands','code' => 'nl_BE', 'encoding' => 'iso-8859-1'), 'pl_PL' => array ( 'name' => 'Polski', 'code' => 'pl_PL', 'encoding' => 'iso-8859-2'), - 'pt_BR' => array ( 'name' => 'Português','code' => 'pt_BR', 'encoding' => 'iso-8859-1'), + 'pt_BR' => array ( 'name' => 'Português (Brasilia)','code' => 'pt_BR', 'encoding' => 'iso-8859-1'), + 'pt_PT' => array ( 'name' => 'Português','code' => 'pt_PT', 'encoding' => 'iso-8859-1'), 'sv_SE' => array ( 'name' => 'Svenska', 'code' => 'sv_SE', 'encoding' => 'iso-8859-1'), 'zh_CN' => array ( 'name' => 'Chinese Simplifed', 'code' => 'zh_CN', 'encoding' => 'utf-8'), ); @@ -128,6 +142,11 @@ ob_start('output_html',0); if (!isset($_SESSION["wa_current_user"])) $_SESSION["wa_current_user"] = new current_user(); +html_cleanup($_GET); +html_cleanup($_POST); +html_cleanup($_REQUEST); +html_cleanup($_SERVER); + $SysPrefs = &$_SESSION['SysPrefs']; // POST vars cleanup needed for direct reuse.