Author: ralfbecker
New Revision: 29212
URL: http://www.egroupware.org/viewvc/egroupware?rev=29212&view=rev
Log:
fixed problem pointed out by Pablo Milano pmilano@cybsec.com
Modified:
branches/1.6/egroupware/login.php
branches/1.6/phpgwapi/inc/class.egw_framework.inc.php
branches/1.6/setup/check_install.php
branches/1.6/setup/inc/class.setup.inc.php
branches/1.6/setup/inc/class.setup_html.inc.php
branches/1.6/setup/inc/class.setup_process.inc.php
branches/1.6/setup/inc/class.setup_translation.inc.php
branches/1.6/setup/inc/functions.inc.php
branches/1.6/sitemgr/inc/class.Content_UI.inc.php
Modified: branches/1.6/egroupware/login.php
URL: http://www.egroupware.org/viewvc/egroupware/branches/1.6/egroupware/login.php?rev=29212&r1=29211&r2=29212&view=diff
— branches/1.6/egroupware/login.php (original)
+++ branches/1.6/egroupware/login.php Sat Feb 13 04:43:42 2010
@@ -310,7 +310,7 @@
$remember_time,’/’); // make the cookie valid for the whole site (incl. sitemgr) and not only the eGW install-dir
}
-
if ($_POST['lang'] && preg_match('/^[a-z]{2}(-[a-z]{2}){0,1}$/',$_POST['lang']) &&
-
if ($_POST['lang'] && preg_match('/^[a-z]{2}(-[a-z]{2})?$/',$_POST['lang']) && $_POST['lang'] != $GLOBALS['egw_info']['user']['preferences']['common']['lang']) { $GLOBALS['egw']->preferences->add('common','lang',$_POST['lang'],'session');
@@ -369,7 +369,7 @@
$GLOBALS[‘egw_info’][‘user’][‘preferences’] = $prefs->read_repository();
}
}
-
if ($_GET['lang'])
-
if ($_GET['lang'] && preg_match('/^[a-z]{2}(-[a-z]{2})?$/',$_GET['lang'])) { $GLOBALS['egw_info']['user']['preferences']['common']['lang'] = $_GET['lang']; }
Modified: branches/1.6/phpgwapi/inc/class.egw_framework.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/branches/1.6/phpgwapi/inc/class.egw_framework.inc.php?rev=29212&r1=29211&r2=29212&view=diff
— branches/1.6/phpgwapi/inc/class.egw_framework.inc.php (original)
+++ branches/1.6/phpgwapi/inc/class.egw_framework.inc.php Sat Feb 13 04:43:42 2010
@@ -203,9 +203,11 @@
*/
protected function _get_header()
{
-
// get used language code -
$lang_code = $GLOBALS['egw_info']['user']['preferences']['common']['lang'];
-
// get used language code (with a little xss check, if someone tries to sneak something in) -
if (preg_match('/^[a-z]{2}(-[a-z]{2})?$/',$GLOBALS['egw_info']['user']['preferences']['common']['lang'])) -
{ -
$lang_code = $GLOBALS['egw_info']['user']['preferences']['common']['lang']; -
} //pngfix defaults to yes if(!$GLOBALS['egw_info']['user']['preferences']['common']['disable_pngfix']) {
Modified: branches/1.6/setup/check_install.php
URL: http://www.egroupware.org/viewvc/egroupware/branches/1.6/setup/check_install.php?rev=29212&r1=29211&r2=29212&view=diff
— branches/1.6/setup/check_install.php (original)
+++ branches/1.6/setup/check_install.php Sat Feb 13 04:43:42 2010
@@ -774,7 +774,7 @@
));
$ConfigDomain = get_var(‘ConfigDomain’,Array(‘POST’,‘COOKIE’));
if (@$_GET[‘intro’]) {
-
if($ConfigLang = get_var('ConfigLang',array('POST','COOKIE')))
-
if(($ConfigLang = setup::get_lang())) { $GLOBALS['egw_setup']->set_cookie('ConfigLang',$ConfigLang,(int) (time()+(1200*9)),'/'); }
Modified: branches/1.6/setup/inc/class.setup.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/branches/1.6/setup/inc/class.setup.inc.php?rev=29212&r1=29211&r2=29212&view=diff
— branches/1.6/setup/inc/class.setup.inc.php (original)
+++ branches/1.6/setup/inc/class.setup.inc.php Sat Feb 13 04:43:42 2010
@@ -197,6 +197,21 @@
}
setcookie($cookiename,$cookievalue,$cookietime,’/’,$this->cookie_domain);
}
+
-
/**
-
- Get configuration language from $_POST or $_COOKIE and validate it
-
-
- @return string
-
*/
-
static function get_lang()
-
{
-
$ConfigLang = get_var('ConfigLang', array('POST','COOKIE')); -
if (preg_match('/^[a-z]{2}(-[a-z]{2})?$',$ConfigLang)) -
{ -
return $ConfigLang; -
} -
return 'en'; -
}
/**
- authenticate the setup user
@@ -207,7 +222,8 @@
{
#phpinfo();
$FormLogout = get_var(‘FormLogout’, array(‘GET’,‘POST’));
- authenticate the setup user
-
$ConfigLang = get_var('ConfigLang', array('POST','COOKIE'));
-
$ConfigLang = self::get_lang(); -
if (!preg_match('/^[')) if(!$FormLogout) { $ConfigLogin = get_var('ConfigLogin', array('POST'));
Modified: branches/1.6/setup/inc/class.setup_html.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/branches/1.6/setup/inc/class.setup_html.inc.php?rev=29212&r1=29211&r2=29212&view=diff
— branches/1.6/setup/inc/class.setup_html.inc.php (original)
+++ branches/1.6/setup/inc/class.setup_html.inc.php Sat Feb 13 04:43:42 2010
@@ -169,7 +169,7 @@
$manual_remote_egw_url = ‘http://manual.egroupware.org/egroupware’;
$url_parts = explode(’/’,$_SERVER[‘PHP_SELF’]);
$script = array_pop($url_parts);
-
$lang = get_var('ConfigLang',Array('POST','COOKIE'));
-
$lang = setup::get_lang(); $url = $manual_remote_egw_url.'/manual/index.php?referer='.urlencode($manual_remote_egw_url.'/setup/'.$script). ($lang ? '&lang='.urlencode($lang) : ''); $GLOBALS['setup_tpl']->set_var('manual','<a href="'.$url.'" target="manual" onclick="'.
Modified: branches/1.6/setup/inc/class.setup_process.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/branches/1.6/setup/inc/class.setup_process.inc.php?rev=29212&r1=29211&r2=29212&view=diff
— branches/1.6/setup/inc/class.setup_process.inc.php (original)
+++ branches/1.6/setup/inc/class.setup_process.inc.php Sat Feb 13 04:43:42 2010
@@ -179,7 +179,7 @@
$langs = false;
if ($method == ‘new’)
{
-
$langs[] = ($own_lang = get_var('ConfigLang',Array('POST','COOKIE')));
-
$langs[] = ($own_lang = setup::get_lang()); if ($own_lang != 'en') $langs[] = 'en'; } $this->translation->drop_add_all_langs($langs);
Modified: branches/1.6/setup/inc/class.setup_translation.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/branches/1.6/setup/inc/class.setup_translation.inc.php?rev=29212&r1=29211&r2=29212&view=diff
— branches/1.6/setup/inc/class.setup_translation.inc.php (original)
+++ branches/1.6/setup/inc/class.setup_translation.inc.php Sat Feb 13 04:43:42 2010
@@ -32,7 +32,7 @@
*/
function setup_translation()
{
-
$ConfigLang = get_var('ConfigLang',Array('POST','COOKIE'));
-
$ConfigLang = setup::get_lang(); if(!$ConfigLang) {
Modified: branches/1.6/setup/inc/functions.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/branches/1.6/setup/inc/functions.inc.php?rev=29212&r1=29211&r2=29212&view=diff
— branches/1.6/setup/inc/functions.inc.php (original)
+++ branches/1.6/setup/inc/functions.inc.php Sat Feb 13 04:43:42 2010
@@ -108,7 +108,7 @@
{
if (!$ConfigLang)
{
-
$ConfigLang = get_var('ConfigLang',Array('POST','COOKIE'));
-
}$ConfigLang = setup::get_lang();
$select = ‘<select name=“ConfigLang”’.($onChange ? ’ onchange=“this.form.submit();”’ : ‘’).’>’ . “\n”;
$languages = get_langs();
Modified: branches/1.6/sitemgr/inc/class.Content_UI.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/branches/1.6/sitemgr/inc/class.Content_UI.inc.php?rev=29212&r1=29211&r2=29212&view=diff
— branches/1.6/sitemgr/inc/class.Content_UI.inc.php (original)
+++ branches/1.6/sitemgr/inc/class.Content_UI.inc.php Sat Feb 13 04:43:42 2010
@@ -42,7 +42,7 @@
$this->sitelanguages = $GLOBALS['Common_BO']->sites->current_site['sitelanguages'];
$GLOBALS['sitemgr_info']['userlang'] = $GLOBALS['egw']->session->appsession('language','sitemgr-site');
-
$this->worklanguage = isset($_POST['savelanguage']) ? $_POST['savelanguage'] :
-
$this->worklanguage = isset($_POST['savelanguage']) && preg_match('/^[a-z]{2}(-[a-z]{2})?$/',$_POST['savelanguage']) ? $_POST['savelanguage'] : ($GLOBALS['sitemgr_info']['userlang'] ? $GLOBALS['sitemgr_info']['userlang'] : $this->sitelanguages[0]); //error_log(__METHOD__."() sitemgr_info[userlanguage]={$GLOBALS['sitemgr_info']['userlang']}, common[lang]={$GLOBALS['egw_info']['user']['preferences']['common']['lang']}, _POST[savelanguage]=$_POST[savelanguage], sitelanguages=".implode(', ',$this->sitelanguages)." --> worklanguage=$this->worklanguage"); $this->errormsg = array();
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs