diff --git a/phpgwapi/doc/CHANGELOG b/phpgwapi/doc/CHANGELOG index 80f6817f71..579b4df425 100644 --- a/phpgwapi/doc/CHANGELOG +++ b/phpgwapi/doc/CHANGELOG @@ -7,6 +7,8 @@ as the true appname - Added limit_query() function, this is a replacement for limit() which should no longer be used - Admins can now force a default app + - Added global option to disable checking the IP address on sessions, usefull for those + behind load balanced proxys. [0.9.12] - Note: These changelogs will only contain changes in the API (preferences, admin, etc) diff --git a/phpgwapi/inc/class.sessions.inc.php b/phpgwapi/inc/class.sessions.inc.php index c4feb1f4af..759604cc4a 100644 --- a/phpgwapi/inc/class.sessions.inc.php +++ b/phpgwapi/inc/class.sessions.inc.php @@ -141,9 +141,12 @@ return False; } - if (PHP_OS != 'Windows' && (! $phpgw_info['user']['session_ip'] || $phpgw_info['user']['session_ip'] != $this->getuser_ip())) + if ($phpgw_info['server']['sessions_checkip']) { - return False; + if (PHP_OS != 'Windows' && (! $phpgw_info['user']['session_ip'] || $phpgw_info['user']['session_ip'] != $this->getuser_ip())) + { + return False; + } } $phpgw->acl->acl($this->account_id); diff --git a/phpgwapi/setup/default_records.inc.php b/phpgwapi/setup/default_records.inc.php index cbfe57a081..3b21220554 100644 --- a/phpgwapi/setup/default_records.inc.php +++ b/phpgwapi/setup/default_records.inc.php @@ -148,4 +148,5 @@ $oProc->query("INSERT INTO languages (lang_id, lang_name, available) VALUES ('zh','Chinese','No')"); $oProc->query("INSERT INTO languages (lang_id, lang_name, available) VALUES ('zt','Chinese(Taiwan)','Yes')"); $oProc->query("INSERT INTO languages (lang_id, lang_name, available) VALUES ('zu','Zulu','No')"); -?> + $oProc->query("INSERT INTO phpgw_config (config_app, config_name, config_value) VALUES ('phpgwapi','sessions_checkip','True')"); +?> \ No newline at end of file diff --git a/preferences/templates/default/config.tpl b/preferences/templates/default/config.tpl index aefadadcdd..8b4191cf2b 100644 --- a/preferences/templates/default/config.tpl +++ b/preferences/templates/default/config.tpl @@ -85,6 +85,16 @@ + + {lang_check_ip_address_of_all_sessions}: + + + + + {lang_Would_you_like_phpGroupWare_to_check_for_a_new_version
when_admins_login_?}: