Skip to content
Permalink
Browse files

Fixed Facebook SDK issue. Minor fixes.

  • Loading branch information...
cubiclesoft committed Jul 5, 2017
1 parent 0de28d2 commit b1df6e402a87da86997762f26677473d9de6777f
Showing with 12 additions and 17 deletions.
  1. +2 −2 endpoint.php
  2. +1 −1 install.php
  3. +9 −14 providers/sso_facebook/facebook-sdk-src/base_facebook.php
@@ -1,6 +1,6 @@
<?php
// SSO server endpoint.
// (C) 2015 CubicleSoft. All Rights Reserved.
// (C) 2017 CubicleSoft. All Rights Reserved.
define("SSO_FILE", 1);
define("SSO_MODE", "endpoint");
@@ -35,7 +35,7 @@ function SSO_EndpointOutput($result)
if (!$sso_skipsleep) SSO_RandomSleep();
$result = @json_encode($result);
$result = @json_encode($result, JSON_UNESCAPED_SLASHES);
if ($sso_encrypted)
{
if ($sso_apikey_info["keyinfo"]["mode"] === "aes256") $result = ExtendedAES::CreateDataPacket($result, $sso_apikey_info["keyinfo"]["key"], $sso_apikey_info["keyinfo"]["opts"]);
@@ -971,7 +971,7 @@ function RefreshChecklist()
<div class="formitem">
<div class="formitemtitle">DSN Options</div>
<input class="text" id="db_dsn" type="text" name="db_dsn" value="" />
<div class="formitemdesc">The initial connection string to connect to the database server. Options are driver specific. Leave blank for the default. Usually takes the form of: host=ipaddr_or_hostname[;port=portnum] (e.g. host=localhost;port=3306)</div>
<div class="formitemdesc">The initial connection string to connect to the database server. Options are driver specific. Leave blank for the default. Usually takes the form of: host=ipaddr_or_hostname[;port=portnum] (e.g. host=127.0.0.1;port=3306)</div>
</div>
<div class="formitem db_login">
<div class="formitemtitle">Username</div>
@@ -390,8 +390,6 @@ public function setAccessToken($access_token) {
*/
public function setExtendedAccessToken() {
try {
// need to circumvent json_decode by calling _oauthRequest
// directly, since response isn't JSON format.
$access_token_response = $this->_oauthRequest(
$this->getUrl('graph', '/oauth/access_token'),
$params = array(
@@ -412,17 +410,16 @@ public function setExtendedAccessToken() {
return false;
}
$response_params = array();
parse_str($access_token_response, $response_params);
$result = json_decode($access_token_response, true);
if (!isset($response_params['access_token'])) {
return false;
if (!is_array($result) || (!isset($result['access_token']))) {
return false;
}
$this->destroySession();
$this->setPersistentData(
'access_token', $response_params['access_token']
'access_token', $result['access_token']
);
}
@@ -803,8 +800,6 @@ protected function getAccessTokenFromCode($code, $redirect_uri = null) {
}
try {
// need to circumvent json_decode by calling _oauthRequest
// directly, since response isn't JSON format.
$access_token_response =
$this->_oauthRequest(
$this->getUrl('graph', '/oauth/access_token'),
@@ -822,13 +817,13 @@ protected function getAccessTokenFromCode($code, $redirect_uri = null) {
return false;
}
$response_params = array();
parse_str($access_token_response, $response_params);
if (!isset($response_params['access_token'])) {
return false;
$result = json_decode($access_token_response, true);
if (!is_array($result) || (!isset($result['access_token']))) {
return false;
}
return $response_params['access_token'];
return $result['access_token'];
}
/**

0 comments on commit b1df6e4

Please sign in to comment.
You can’t perform that action at this time.