aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoseph Warner <hardolaf@hardolaf.com>2013-07-24 16:02:33 -0400
committerJoseph Warner <hardolaf@hardolaf.com>2013-07-24 16:02:59 -0400
commitf8dbaa148dccb105133b5a91d58686d79f020afe (patch)
tree32dab8ada9e8e3e21feb7510bc9672f5c3f62d29
parentc5d2b75022f177ea04dfd0528cd54cd5d95ee16a (diff)
downloadforums-f8dbaa148dccb105133b5a91d58686d79f020afe.tar
forums-f8dbaa148dccb105133b5a91d58686d79f020afe.tar.gz
forums-f8dbaa148dccb105133b5a91d58686d79f020afe.tar.bz2
forums-f8dbaa148dccb105133b5a91d58686d79f020afe.tar.xz
forums-f8dbaa148dccb105133b5a91d58686d79f020afe.zip
[feature/oauth] Fixes for problems found by tests
PHPBB3-11673
-rw-r--r--phpBB/phpbb/auth/provider/oauth/token_storage.php12
-rw-r--r--tests/auth/provider_oauth_token_storage_test.php2
2 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/phpbb/auth/provider/oauth/token_storage.php b/phpBB/phpbb/auth/provider/oauth/token_storage.php
index ec54c07fea..de99f9bd31 100644
--- a/phpBB/phpbb/auth/provider/oauth/token_storage.php
+++ b/phpBB/phpbb/auth/provider/oauth/token_storage.php
@@ -87,7 +87,7 @@ class phpbb_auth_provider_oauth_token_storage implements TokenStorageInterface
}
$data = array(
- 'user_id' => $this->user->data['user_id'],
+ 'user_id' => $this->user->data['user_id'],
'provider' => $this->service_name,
);
@@ -130,9 +130,9 @@ class phpbb_auth_provider_oauth_token_storage implements TokenStorageInterface
$this->cachedToken = $token;
$data = array(
- 'user_id' => $this->user->data['user_id'],
- 'provider' => $this->service_name,
- 'oauth_token' => serialize($token),
+ 'user_id' => $this->user->data['user_id'],
+ 'provider' => $this->service_name,
+ 'oauth_token' => serialize($token),
);
if ($this->user->data['user_id'] == ANONYMOUS)
@@ -155,7 +155,7 @@ class phpbb_auth_provider_oauth_token_storage implements TokenStorageInterface
}
$data = array(
- 'user_id' => $this->user->data['user_id'],
+ 'user_id' => $this->user->data['user_id'],
'provider' => $this->service_name,
);
@@ -187,7 +187,7 @@ class phpbb_auth_provider_oauth_token_storage implements TokenStorageInterface
$sql = 'DELETE FROM ' . $this->auth_provider_oauth_table . '
WHERE user_id = ' . $this->user->data['user_id'] . '
- AND provider = ' . $this->db->sql_escape($this->oauth_provider);
+ AND provider = \'' . $this->db->sql_escape($this->oauth_provider) . '\'';
if ($this->user->data['user_id'] == ANONYMOUS)
{
diff --git a/tests/auth/provider_oauth_token_storage_test.php b/tests/auth/provider_oauth_token_storage_test.php
index 1d5505ee8e..fced3184df 100644
--- a/tests/auth/provider_oauth_token_storage_test.php
+++ b/tests/auth/provider_oauth_token_storage_test.php
@@ -151,4 +151,4 @@ class phpbb_auth_provider_oauth_token_storage_test extends phpbb_database_test_c
return $row;
}
-} \ No newline at end of file
+}