aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authormrgoldy <gijsmartens1@gmail.com>2019-10-08 20:12:24 +0200
committermrgoldy <gijsmartens1@gmail.com>2019-10-08 20:12:24 +0200
commit1f669a31a08a817c5614386658d01f8827bb4372 (patch)
tree0af6d6570a69cffcf246718a2680d5f006be4fe7 /phpBB
parentc75c13e5554652927a8aa57bd3b9f3902f57b429 (diff)
downloadforums-1f669a31a08a817c5614386658d01f8827bb4372.tar
forums-1f669a31a08a817c5614386658d01f8827bb4372.tar.gz
forums-1f669a31a08a817c5614386658d01f8827bb4372.tar.bz2
forums-1f669a31a08a817c5614386658d01f8827bb4372.tar.xz
forums-1f669a31a08a817c5614386658d01f8827bb4372.zip
[ticket/16181] Enforce string data type
PHPBB3-16181
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
index 0d94acfbca..8352fb649d 100644
--- a/phpBB/phpbb/auth/provider/oauth/oauth.php
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -216,10 +216,15 @@ class oauth extends \phpbb\auth\provider\base
$this->service_providers[$service_name]->set_external_service_provider($service);
$unique_id = $this->service_providers[$service_name]->perform_auth_login();
- // Check to see if this provider is already assosciated with an account
+ /**
+ * Check to see if this provider is already assosciated with an account.
+ *
+ * Enforcing a data type to make sure it are strings and not integers,
+ * so values are quoted in the SQL WHERE statement.
+ */
$data = array(
- 'provider' => $service_name_original,
- 'oauth_provider_id' => $unique_id
+ 'provider' => (string) $service_name_original,
+ 'oauth_provider_id' => (string) $unique_id
);
$sql = 'SELECT user_id FROM ' . $this->auth_provider_oauth_token_account_assoc . '