[ticket/12716] Use a string as session_id

PHPBB3-12716
This commit is contained in:
Tristan Darricau 2014-06-23 23:59:45 +02:00
parent 8595b2ae86
commit 2ebd86611a
2 changed files with 3 additions and 3 deletions

View file

@ -7,7 +7,7 @@
<column>oauth_token</column> <column>oauth_token</column>
<row> <row>
<value>1</value> <value>1</value>
<value>9999</value> <value>abcd</value>
<value>auth.provider.oauth.service.testing</value> <value>auth.provider.oauth.service.testing</value>
<value>{"token_class":"phpbb_not_a_token","accessToken":"error","refreshToken":0,"endOfLife":null,"extraParams":null}</value> <value>{"token_class":"phpbb_not_a_token","accessToken":"error","refreshToken":0,"endOfLife":null,"extraParams":null}</value>
</row> </row>

View file

@ -77,7 +77,7 @@ class phpbb_auth_provider_oauth_token_storage_test extends phpbb_database_test_c
public function test_retrieveAccessToken_wrong_token() public function test_retrieveAccessToken_wrong_token()
{ {
$this->user->data['session_id'] = 9999; $this->user->data['session_id'] = 'abcd';
try try
{ {
$this->token_storage->retrieveAccessToken($this->service_name); $this->token_storage->retrieveAccessToken($this->service_name);
@ -87,7 +87,7 @@ class phpbb_auth_provider_oauth_token_storage_test extends phpbb_database_test_c
{ {
} }
$row = $this->get_token_row_by_session_id(9999); $row = $this->get_token_row_by_session_id('abcd');
$this->assertFalse($row); $this->assertFalse($row);
} }