diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index a4d46f5a1..270bb4b13 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -3875,7 +3875,7 @@ class e107 exit(); } - if(($key == "QUERY_STRING") && empty($_GET['hauth_done']) && ( // exception for hybridAuth. + if(($key == "QUERY_STRING") && empty($_GET['hauth_done']) && empty($_GET['hauth.done']) && ( // exception for hybridAuth. strpos(strtolower($input),"=http")!==FALSE || strpos(strtolower($input),strtolower("http%3A%2F%2F"))!==FALSE )) diff --git a/e107_handlers/hybridauth/Hybrid/Providers/Github.php b/e107_handlers/hybridauth/Hybrid/Providers/Github.php index c20fc1e2a..f2e02c8d8 100644 --- a/e107_handlers/hybridauth/Hybrid/Providers/Github.php +++ b/e107_handlers/hybridauth/Hybrid/Providers/Github.php @@ -65,6 +65,14 @@ class Hybrid_Providers_GitHub extends Hybrid_Provider_Model_OAuth2 && property_exists($email, 'email') ) { $this->user->profile->email = $email->email; + + // record whether the email address is verified + if (property_exists($email, 'verified') + && true === $email->verified + ) { + $this->user->profile->emailVerified = $email->email; + } + break; } } @@ -89,7 +97,7 @@ class Hybrid_Providers_GitHub extends Hybrid_Provider_Model_OAuth2 $contacts = array(); try { $response = $this->api->api( "user/followers" ); - } catch (LinkedInException $e) { + } catch (Exception $e) { throw new Exception("User contacts request failed! {$this->providerId} returned an error: $e"); } // @@ -97,7 +105,7 @@ class Hybrid_Providers_GitHub extends Hybrid_Provider_Model_OAuth2 foreach ($response as $contact) { try { $contactInfo = $this->api->api( "users/".$contact->login ); - } catch (LinkedInException $e) { + } catch (Exception $e) { throw new Exception("Contact info request failed for user {$contact->login}! {$this->providerId} returned an error: $e"); } // diff --git a/e107_handlers/hybridauth/Hybrid/Providers/Steam.php b/e107_handlers/hybridauth/Hybrid/Providers/Steam.php index 373e8bf42..072b131b2 100644 --- a/e107_handlers/hybridauth/Hybrid/Providers/Steam.php +++ b/e107_handlers/hybridauth/Hybrid/Providers/Steam.php @@ -63,8 +63,13 @@ class Hybrid_Providers_Steam extends Hybrid_Provider_Model_OpenID { $apiUrl = 'http://steamcommunity.com/profiles/' . $this->user->profile->identifier . '/?xml=1'; - $data = @file_get_contents($apiUrl); - $data = @ new SimpleXMLElement($data); + try { + $data = @file_get_contents($apiUrl); + $data = @ new SimpleXMLElement($data); + } catch(Exception $e) { + Hybrid_Logger::error( "Steam::getUserProfileLegacyAPI() error: ", $e->getMessage()); + return false; + } if (!is_object($data)) { return false; @@ -76,7 +81,7 @@ class Hybrid_Providers_Steam extends Hybrid_Provider_Model_OpenID $this->user->profile->profileURL = 'http://steamcommunity.com/id/' . (string) $data->customURL . '/'; } else { - $this->user->profile->profileURL = "http://steamcommunity.com/profiles/{$this->user->profile->identifier}/"; + $this->user->profile->profileURL = "http://steamcommunity.com/profiles/{$this->user->profile->identifier}/"; } $this->user->profile->webSiteURL = ""; @@ -99,6 +104,5 @@ class Hybrid_Providers_Steam extends Hybrid_Provider_Model_OpenID $this->user->profile->region = property_exists($data, 'location') ? (string)$data->location : ''; $this->user->profile->city = ""; $this->user->profile->zip = ""; - } }