Commit 709c42e9 authored by Kasper Skårhøj's avatar Kasper Skårhøj
Browse files

* Added a checkbox for be-users to disable IP locking. This is useful if you have backend users complaining about being thrown off sessions.


git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@144 709f56b5-9817-0410-a4d7-c38de5d9e867
parent 3288d77c
2004-03-23 Kasper Skårhøj,,, <kasper@typo3.com>
* Added a checkbox for be-users to disable IP locking. This is useful if you have backend users complaining about being thrown off sessions.
[RC2 note:
As usual the changelog is not at all "complete" in terms of what has been changed. I regret this, but the tradeoff would be slower development if all details had to go in here which is why they don't.
However all IMPORTANT changes that might break compatibility somewhere is always entered in the log with "!!!" prefixed.
......
......@@ -44,7 +44,7 @@
* 419: function logoff()
* 434: function gc()
* 448: function user_where_clause()
* 462: function ipLockClause()
* 462: function ipLockClause()
* 478: function writeUC($variable='')
* 501: function writelog($type,$action,$error,$details_nr,$details,$data,$tablename,$recuid,$recpid)
* 510: function checkLogFailures()
......@@ -202,7 +202,7 @@ class t3lib_userAuth {
$this->session_table.'.ses_id = "'.$GLOBALS['TYPO3_DB']->quoteStr($this->id, $this->session_table).'"
AND '.$this->session_table.'.ses_name = "'.$GLOBALS['TYPO3_DB']->quoteStr($this->name, $this->session_table).'"
AND '.$this->session_table.'.ses_userid = '.$this->user_table.'.'.$this->userid_column.'
'.$this->ipLockClause().'
'.$this->ipLockClause().'
'.$this->user_where_clause()
);
if ($this->user = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbres)) {
......@@ -217,7 +217,8 @@ class t3lib_userAuth {
if ($timeout>0 && ($GLOBALS['EXEC_TIME'] < ($this->user['ses_tstamp']+$timeout))) {
$GLOBALS['TYPO3_DB']->exec_UPDATEquery(
$this->session_table,
'ses_id="'.$GLOBALS['TYPO3_DB']->quoteStr($this->id, $this->session_table).'" AND ses_name="'.$GLOBALS['TYPO3_DB']->quoteStr($this->name, $this->session_table).'"',
'ses_id="'.$GLOBALS['TYPO3_DB']->quoteStr($this->id, $this->session_table).'"
AND ses_name="'.$GLOBALS['TYPO3_DB']->quoteStr($this->name, $this->session_table).'"',
array('ses_tstamp' => $GLOBALS['EXEC_TIME'])
);
$this->user['ses_tstamp'] = $GLOBALS['EXEC_TIME']; // Make sure that the timestamp is also updated in the array
......@@ -330,12 +331,12 @@ class t3lib_userAuth {
} else {
// The loginsession is started.
$this->loginSessionStarted = 1;
// Inserting session record:
$insertFields = array(
'ses_id' => $this->id,
'ses_name' => $this->name,
'ses_iplock' => t3lib_div::getIndpEnv('REMOTE_ADDR'),
'ses_name' => $this->name,
'ses_iplock' => $this->user['disableIPlock'] ? '[DISABLED]' : t3lib_div::getIndpEnv('REMOTE_ADDR'),
'ses_userid' => $tempuser[$this->userid_column],
'ses_tstamp' => $GLOBALS['EXEC_TIME']
);
......@@ -461,8 +462,10 @@ class t3lib_userAuth {
*/
function ipLockClause() {
if ($this->lockIP) {
$wherePart = 'AND '.$this->session_table.'.ses_iplock="'.$GLOBALS['TYPO3_DB']->quoteStr(t3lib_div::getIndpEnv('REMOTE_ADDR'),$this->session_table).'"';
$wherePart = 'AND (
'.$this->session_table.'.ses_iplock="'.$GLOBALS['TYPO3_DB']->quoteStr(t3lib_div::getIndpEnv('REMOTE_ADDR'),$this->session_table).'"
OR '.$this->session_table.'.ses_iplock="[DISABLED]"
)';
return $wherePart;
}
}
......@@ -614,4 +617,4 @@ class t3lib_userAuth {
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_userauth.php']) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_userauth.php']);
}
?>
\ No newline at end of file
?>
......@@ -63,7 +63,7 @@ $TYPO3_CONF_VARS = Array(
'curlProxyServer' => '', // String: Proxyserver as http://proxy:port/.
'curlProxyTunnel' => 0, // Boolean: If set, use a tunneled connection through the proxy (usefull for websense etc.).
'curlProxyUserPass' => '', // String: Proxyserver authentication user:pass.
'form_enctype' => 'multipart/form-data', // String: This is the default form encryption type for most forms in TYPO3. It allows for file uploads to be in the form. However if file-upload is disabled for your PHP version even ordinary data sent with this encryption will not get to the server. So if you have file_upload disabled, you will have to change this to eg. 'application/x-www-form-urlencoded'
'form_enctype' => 'multipart/form-data', // String: This is the default form encoding type for most forms in TYPO3. It allows for file uploads to be in the form. However if file-upload is disabled for your PHP version even ordinary data sent with this encryption will not get to the server. So if you have file_upload disabled, you will have to change this to eg. 'application/x-www-form-urlencoded'
'loginCopyrightWarrantyProvider' => '', // String: If you provide warranty for TYPO3 to your customers insert you (company) name here. It will appear in the login-dialog as the warranty provider. (You must also set URL below).
'loginCopyrightWarrantyURL' => '', // String: Add the URL where you explain the extend of the warranty you provide. This URL is displayed in the login dialog as the place where people can learn more about the conditions of your warranty. Must be set (more than 10 chars) in addition with the 'loginCopyrightWarrantyProvider' message.
'loginCopyrightShowVersion' => 0, // Boolean: If set, the current TYPO3 version is shown.
......
......@@ -74,6 +74,7 @@ CREATE TABLE be_users (
file_mountpoints varchar(40) DEFAULT '' NOT NULL,
fileoper_perms tinyint(4) DEFAULT '0' NOT NULL,
lockToDomain varchar(50) DEFAULT '' NOT NULL,
disableIPlock tinyint(3) unsigned DEFAULT '0' NOT NULL,
deleted tinyint(3) unsigned DEFAULT '0' NOT NULL,
TSconfig blob NOT NULL,
lastlogin int(10) unsigned DEFAULT '0' NOT NULL,
......
......@@ -203,6 +203,12 @@ $TCA['be_users'] = Array (
'type' => 'check'
)
),
'disableIPlock' => Array (
'label' => 'Disable IP lock for user:',
'config' => Array (
'type' => 'check'
)
),
'admin' => Array (
'label' => 'Admin(!):',
'config' => Array (
......@@ -334,8 +340,8 @@ $TCA['be_users'] = Array (
'createdByAction' => Array('config'=>array('type'=>'passthrough'))
),
'types' => Array (
'0' => Array('showitem' => 'username;;;;2-2-2, password, usergroup, lockToDomain, admin;;;;5-5-5, realName;;;;3-3-3, email, lang, userMods;;;;4-4-4, options, db_mountpoints, file_mountpoints, fileoper_perms, --div--, TSconfig;;;;5-5-5'),
'1' => Array('showitem' => 'username;;;;2-2-2, password, usergroup, admin;;;;5-5-5, realName;;;;3-3-3, email, lang, options;;;;4-4-4, db_mountpoints, file_mountpoints, fileoper_perms, --div--, TSconfig;;;;5-5-5')
'0' => Array('showitem' => 'username;;;;2-2-2, password, usergroup, lockToDomain, disableIPlock, admin;;;;5-5-5, realName;;;;3-3-3, email, lang, userMods;;;;4-4-4, options, db_mountpoints, file_mountpoints, fileoper_perms, --div--, TSconfig;;;;5-5-5'),
'1' => Array('showitem' => 'username;;;;2-2-2, password, usergroup, disableIPlock, admin;;;;5-5-5, realName;;;;3-3-3, email, lang, options;;;;4-4-4, db_mountpoints, file_mountpoints, fileoper_perms, --div--, TSconfig;;;;5-5-5')
),
'palettes' => Array (
'1' => Array('showitem' => 'disable, starttime, endtime')
......@@ -598,4 +604,4 @@ $TCA['sys_filemounts'] = Array (
'0' => Array('showitem' => 'hidden;;;;1-1-1,title;;;;3-3-3,path,base')
)
);
?>
\ No newline at end of file
?>
......@@ -25,6 +25,8 @@ be_groups',
'_lockToDomain.seeAlso' => 'be_groups:lockToDomain,
fe_users:lockToDomain,
fe_groups:lockToDomain',
'disableIPlock.description' => 'Disable the lock of the backend users session to the remote IP number.',
'disableIPlock.details' => 'You will have to disable this lock if backend users are accessing TYPO3 from ISDN or modem connections which may shutdown and reconnect with a new IP. The same would be true for DHCP assignment of IP numbers where new IP numbers are frequently assigned.',
'db_mountpoints.description' => 'Assign startpoints for the users page tree.',
'db_mountpoints.details' => 'The page tree used my all Web-submodules to navigate must have some points-of-entry defined. Here you should insert one or more references to a page which will represent a new root page for the page tree. This is called a \'Database mount\'.
......@@ -199,4 +201,4 @@ u Korisnik>Postavke modulu.',
'ua' => Array (
),
);
?>
\ No newline at end of file
?>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment