mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/10082] session_id is CHAR(32) not VARCHAR(32), so give them a CHAR(32).
This commit is contained in:
commit
1312e5b965
2 changed files with 11 additions and 7 deletions
|
@ -19,21 +19,25 @@ class phpbb_session_continue_test extends phpbb_database_test_case
|
||||||
|
|
||||||
static public function session_begin_attempts()
|
static public function session_begin_attempts()
|
||||||
{
|
{
|
||||||
|
// The session_id field is defined as CHAR(32) in the database schema.
|
||||||
|
// Thus the data we put in session_id fields has to have a length of 32 characters on stricter DBMSes.
|
||||||
|
// Thus we fill those strings up with zeroes until they have a string length of 32.
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
array(
|
array(
|
||||||
'bar_session', '4', 'user agent', '127.0.0.1',
|
'bar_session000000000000000000000', '4', 'user agent', '127.0.0.1',
|
||||||
array(
|
array(
|
||||||
array('session_id' => 'anon_session', 'session_user_id' => 1),
|
array('session_id' => 'anon_session00000000000000000000', 'session_user_id' => 1),
|
||||||
array('session_id' => 'bar_session', 'session_user_id' => 4),
|
array('session_id' => 'bar_session000000000000000000000', 'session_user_id' => 4),
|
||||||
),
|
),
|
||||||
array(),
|
array(),
|
||||||
'If a request comes with a valid session id with matching user agent and IP, no new session should be created.',
|
'If a request comes with a valid session id with matching user agent and IP, no new session should be created.',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'anon_session', '4', 'user agent', '127.0.0.1',
|
'anon_session00000000000000000000', '4', 'user agent', '127.0.0.1',
|
||||||
array(
|
array(
|
||||||
array('session_id' => '__new_session_id__', 'session_user_id' => 1), // use generated SID
|
array('session_id' => '__new_session_id__', 'session_user_id' => 1), // use generated SID
|
||||||
array('session_id' => 'bar_session', 'session_user_id' => 4),
|
array('session_id' => 'bar_session000000000000000000000', 'session_user_id' => 4),
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'u' => array('1', null),
|
'u' => array('1', null),
|
||||||
|
|
|
@ -22,13 +22,13 @@
|
||||||
<column>session_ip</column>
|
<column>session_ip</column>
|
||||||
<column>session_browser</column>
|
<column>session_browser</column>
|
||||||
<row>
|
<row>
|
||||||
<value>anon_session</value>
|
<value>anon_session00000000000000000000</value>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
<value>127.0.0.1</value>
|
<value>127.0.0.1</value>
|
||||||
<value>anonymous user agent</value>
|
<value>anonymous user agent</value>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<value>bar_session</value>
|
<value>bar_session000000000000000000000</value>
|
||||||
<value>4</value>
|
<value>4</value>
|
||||||
<value>127.0.0.1</value>
|
<value>127.0.0.1</value>
|
||||||
<value>user agent</value>
|
<value>user agent</value>
|
||||||
|
|
Loading…
Add table
Reference in a new issue