fix issue pointed out by Andrew McNicol

This commit is contained in:
Ralf Becker 2015-09-03 16:21:34 +00:00
parent 6e973a0804
commit de66a0a10e
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ class setup
$this->detection = new setup_detection(); $this->detection = new setup_detection();
$this->process = new setup_process(); $this->process = new setup_process();
if ($_REQUEST['system_charset']) $this->system_charset = $_REQUEST['system_charset']; if (preg_match('/^[a-z0-9-]+$/i', $_REQUEST['system_charset'])) $this->system_charset = $_REQUEST['system_charset'];
/* The setup application needs these */ /* The setup application needs these */
if ($html) $this->html = new setup_html(); if ($html) $this->html = new setup_html();

View File

@ -336,7 +336,7 @@ switch($GLOBALS['egw_info']['setup']['stage']['db'])
{ {
$setup_info = $GLOBALS['egw_setup']->detection->upgrade_exclude($setup_info); $setup_info = $GLOBALS['egw_setup']->detection->upgrade_exclude($setup_info);
// Set the DB's client charset if a system-charset is set // Set the DB's client charset if a system-charset is set
if ($_REQUEST['system_charset']) if (preg_match('/^[a-z0-9-]+$/i', $_REQUEST['system_charset']))
{ {
$GLOBALS['egw_setup']->system_charset = $_REQUEST['system_charset']; $GLOBALS['egw_setup']->system_charset = $_REQUEST['system_charset'];
$GLOBALS['egw_setup']->db->Link_ID->SetCharSet($_REQUEST['system_charset']); $GLOBALS['egw_setup']->db->Link_ID->SetCharSet($_REQUEST['system_charset']);