aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/auth/provider
diff options
context:
space:
mode:
authorJoseph Warner <hardolaf@hardolaf.com>2013-07-13 11:29:00 -0400
committerJoseph Warner <hardolaf@hardolaf.com>2013-07-14 14:22:42 -0400
commitd63f920250b801cf9e2bc1929a40ade7526078ff (patch)
treeda103314914cb3071da5228177ec0190d98d4387 /phpBB/includes/auth/provider
parent1e38be3fa95d18d05c303d9c8be5af174dc6d07d (diff)
downloadforums-d63f920250b801cf9e2bc1929a40ade7526078ff.tar
forums-d63f920250b801cf9e2bc1929a40ade7526078ff.tar.gz
forums-d63f920250b801cf9e2bc1929a40ade7526078ff.tar.bz2
forums-d63f920250b801cf9e2bc1929a40ade7526078ff.tar.xz
forums-d63f920250b801cf9e2bc1929a40ade7526078ff.zip
[feature/oauth] Check that the service actually has settings
PHPBB3-11673
Diffstat (limited to 'phpBB/includes/auth/provider')
-rw-r--r--phpBB/includes/auth/provider/oauth.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/phpBB/includes/auth/provider/oauth.php b/phpBB/includes/auth/provider/oauth.php
index 2004f87e97..cbb1d99004 100644
--- a/phpBB/includes/auth/provider/oauth.php
+++ b/phpBB/includes/auth/provider/oauth.php
@@ -60,6 +60,15 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
// Get the service credentials for the given service
$service_credentials = $this->get_credentials($service);
+ // Check that the service has settings
+ if ($service_credentials['key'] == false || $service_credentials['secret'] == false)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_EXTERNAL_AUTH,
+ 'error_msg' => 'LOGIN_ERROR_EXTERNAL_AUTH_APACHE',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
$service_factory = new \OAuth\ServiceFactory();
$uri_factory = new \OAuth\Common\Http\Uri\UriFactory();