diff --git a/components/testing_framework/Resources/Core/Acceptance/Fixtures/be_sessions.xml b/components/testing_framework/Resources/Core/Acceptance/Fixtures/be_sessions.xml index ea0ce289e0a6d994bcecc3561db29152cab90c30..e744814920190ede6e20540846cc6287baa7af3c 100644 --- a/components/testing_framework/Resources/Core/Acceptance/Fixtures/be_sessions.xml +++ b/components/testing_framework/Resources/Core/Acceptance/Fixtures/be_sessions.xml @@ -2,7 +2,6 @@ <dataset> <be_sessions> <ses_id>886526ce72b86870739cc41991144ec1</ses_id> - <ses_name>be_typo_user</ses_name> <ses_iplock>[DISABLED]</ses_iplock> <ses_userid>1</ses_userid> <ses_tstamp>1777777777</ses_tstamp> @@ -11,7 +10,6 @@ </be_sessions> <be_sessions> <ses_id>ff83dfd81e20b34c27d3e97771a4525a</ses_id> - <ses_name>be_typo_user</ses_name> <ses_iplock>[DISABLED]</ses_iplock> <ses_userid>2</ses_userid> <ses_tstamp>1777777777</ses_tstamp> diff --git a/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php b/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php index 5812b3b0280d7d3c9fa78e6aeddfbe06c804d0a7..af392b8ab9858b74806686f28f46f4a04ce71f98 100644 --- a/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php +++ b/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php @@ -942,7 +942,6 @@ abstract class AbstractUserAuthentication return [ 'ses_id' => $this->id, - 'ses_name' => $this->name, 'ses_iplock' => $sessionIpLock, 'ses_userid' => $tempuser[$this->userid_column] ?? 0, 'ses_tstamp' => $GLOBALS['EXEC_TIME'], @@ -998,7 +997,7 @@ abstract class AbstractUserAuthentication $sessionUpdateGracePeriod = 61; if (!$skipSessionUpdate && $GLOBALS['EXEC_TIME'] > ($userRecord['ses_tstamp'] + $sessionUpdateGracePeriod)) { // Update the session timestamp by writing a dummy update. (Backend will update the timestamp) - $updatesSession = $this->getSessionBackend()->update($this->id, ['ses_name' => $userRecord['ses_name']]); + $updatesSession = $this->getSessionBackend()->update($this->id, []); $userRecord = array_merge($userRecord, $updatesSession); } } else { diff --git a/typo3/sysext/core/Tests/Functional/Session/Backend/DatabaseSessionBackendTest.php b/typo3/sysext/core/Tests/Functional/Session/Backend/DatabaseSessionBackendTest.php index b8fb26165344850d7f9944a99f2e8e01dbe104a2..423316dd1332fd30f4ba6d68d6175f16e2e9b09b 100644 --- a/typo3/sysext/core/Tests/Functional/Session/Backend/DatabaseSessionBackendTest.php +++ b/typo3/sysext/core/Tests/Functional/Session/Backend/DatabaseSessionBackendTest.php @@ -35,7 +35,6 @@ class DatabaseSessionBackendTest extends FunctionalTestCase */ protected $testSessionRecord = [ 'ses_id' => 'randomSessionId', - 'ses_name' => 'session_name', 'ses_userid' => 1, // serialize(['foo' => 'bar', 'boo' => 'far']) 'ses_data' => 'a:2:{s:3:"foo";s:3:"bar";s:3:"boo";s:3:"far";}', @@ -234,11 +233,11 @@ class DatabaseSessionBackendTest extends FunctionalTestCase { $updatedRecord = array_merge( $this->testSessionRecord, - ['ses_name' => 'newSessionName', 'ses_tstamp' => $GLOBALS['EXEC_TIME']] + ['ses_tstamp' => $GLOBALS['EXEC_TIME']] ); $sessionId = 'randomSessionId'; $this->subject->set($sessionId, $this->testSessionRecord); - $this->subject->update($sessionId, ['ses_name' => 'newSessionName']); + $this->subject->update($sessionId, []); $this->assertArraySubset($updatedRecord, $this->subject->get($sessionId)); } } diff --git a/typo3/sysext/core/Tests/Functional/Session/Backend/RedisSessionBackendTest.php b/typo3/sysext/core/Tests/Functional/Session/Backend/RedisSessionBackendTest.php index 4a83ba7407f6ddb2d803588c7e635d923aa0a1c6..721acf0efe60220714496b740cc970a5906297df 100644 --- a/typo3/sysext/core/Tests/Functional/Session/Backend/RedisSessionBackendTest.php +++ b/typo3/sysext/core/Tests/Functional/Session/Backend/RedisSessionBackendTest.php @@ -36,7 +36,6 @@ class RedisSessionBackendTest extends FunctionalTestCase */ protected $testSessionRecord = [ 'ses_id' => 'randomSessionId', - 'ses_name' => 'session_name', 'ses_userid' => 1, // serialize(['foo' => 'bar', 'boo' => 'far']) 'ses_data' => 'a:2:{s:3:"foo";s:3:"bar";s:3:"boo";s:3:"far";}', @@ -264,11 +263,11 @@ class RedisSessionBackendTest extends FunctionalTestCase { $updatedRecord = array_merge( $this->testSessionRecord, - ['ses_name' => 'newSessionName', 'ses_tstamp' => $GLOBALS['EXEC_TIME']] + ['ses_tstamp' => $GLOBALS['EXEC_TIME']] ); $sessionId = 'randomSessionId'; $this->subject->set($sessionId, $this->testSessionRecord); - $this->subject->update($sessionId, ['ses_name' => 'newSessionName']); + $this->subject->update($sessionId, []); $this->assertArraySubset($updatedRecord, $this->subject->get($sessionId)); } } diff --git a/typo3/sysext/core/ext_tables.sql b/typo3/sysext/core/ext_tables.sql index 8319c9b8f426447f7767a3f16981293db159c6fd..cfe5f81f25df4c452fac03705f4453a3656060cd 100644 --- a/typo3/sysext/core/ext_tables.sql +++ b/typo3/sysext/core/ext_tables.sql @@ -37,13 +37,12 @@ CREATE TABLE be_groups ( # CREATE TABLE be_sessions ( ses_id varchar(32) DEFAULT '' NOT NULL, - ses_name varchar(100) DEFAULT '' NOT NULL, ses_iplock varchar(39) DEFAULT '' NOT NULL, ses_userid int(11) unsigned DEFAULT '0' NOT NULL, ses_tstamp int(11) unsigned DEFAULT '0' NOT NULL, ses_data longblob, ses_backuserid int(11) NOT NULL default '0', - PRIMARY KEY (ses_id,ses_name), + PRIMARY KEY (ses_id), KEY ses_tstamp (ses_tstamp) ); diff --git a/typo3/sysext/frontend/Tests/Unit/Authentication/FrontendUserAuthenticationTest.php b/typo3/sysext/frontend/Tests/Unit/Authentication/FrontendUserAuthenticationTest.php index b0032bbc064827c316b81e7af23187bb71b11df6..f72d749c5bc85c837ce58284c01d982b52819b45 100644 --- a/typo3/sysext/frontend/Tests/Unit/Authentication/FrontendUserAuthenticationTest.php +++ b/typo3/sysext/frontend/Tests/Unit/Authentication/FrontendUserAuthenticationTest.php @@ -233,7 +233,6 @@ class FrontendUserAuthenticationTest extends UnitTestCase 'newSessionId', [ 'ses_id' => 'newSessionId', - 'ses_name' => 'fe_typo_user', 'ses_iplock' => '', 'ses_userid' => 0, 'ses_tstamp' => $currentTime, @@ -290,7 +289,6 @@ class FrontendUserAuthenticationTest extends UnitTestCase [ 'ses_id' => $uniqueSessionId, 'ses_userid' => 1, - 'ses_name' => 'fe_typo_user', 'ses_iplock' => '[DISABLED]', 'ses_tstamp' => $currentTime, 'ses_data' => serialize(['foo' => 'bar']), diff --git a/typo3/sysext/frontend/ext_tables.sql b/typo3/sysext/frontend/ext_tables.sql index df809c119a0c1ee8255bb1eb204ff24e53674158..594207cf1613340fcc6e20b5147a271ed24abaca 100644 --- a/typo3/sysext/frontend/ext_tables.sql +++ b/typo3/sysext/frontend/ext_tables.sql @@ -50,7 +50,6 @@ CREATE TABLE fe_groups ( # CREATE TABLE fe_sessions ( ses_id varchar(32) DEFAULT '' NOT NULL, - ses_name varchar(100) DEFAULT '' NOT NULL, ses_iplock varchar(39) DEFAULT '' NOT NULL, ses_userid int(11) unsigned DEFAULT '0' NOT NULL, ses_tstamp int(11) unsigned DEFAULT '0' NOT NULL, @@ -58,7 +57,7 @@ CREATE TABLE fe_sessions ( ses_permanent tinyint(1) unsigned DEFAULT '0' NOT NULL, ses_anonymous tinyint(1) unsigned DEFAULT '0' NOT NULL, - PRIMARY KEY (ses_id,ses_name), + PRIMARY KEY (ses_id), KEY ses_tstamp (ses_tstamp) ) ENGINE=InnoDB;