From d851a32c0bbd13c3981def22171c546daa27c3e0 Mon Sep 17 00:00:00 2001 From: German Lena Date: Wed, 20 May 2015 12:46:09 -0300 Subject: [PATCH 1/2] Fix error when the state param is not present --- WP_Auth0.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WP_Auth0.php b/WP_Auth0.php index 707f20c34..1d2110258 100644 --- a/WP_Auth0.php +++ b/WP_Auth0.php @@ -388,13 +388,13 @@ public static function init_auth0(){ $userinfo = json_decode( $response['body'] ); if (self::login_user($userinfo, $data)) { - if ($stateFromGet->interim) { + if ($stateFromGet !== null && isset($stateFromGet->interim) && $stateFromGet->interim) { include WPA0_PLUGIN_DIR . 'templates/login-interim.php'; exit(); } else { - if (isset($stateFromGet->redirect_to)) { + if ($stateFromGet !== null && isset($stateFromGet->redirect_to)) { $redirectURL = $stateFromGet->redirect_to; } else { $redirectURL = WP_Auth0_Options::get( 'default_login_redirection' ); @@ -656,13 +656,13 @@ public static function implicitLogin() { $decodedToken->user_id = $decodedToken->sub; if (self::login_user($decodedToken, $token)) { - if ($stateFromGet->interim) { + if ($stateFromGet !== null && isset($stateFromGet->interim) && $stateFromGet->interim) { include WPA0_PLUGIN_DIR . 'templates/login-interim.php'; exit(); } else { - if (isset($stateFromGet->redirect_to)) { + if ($stateFromGet !== null && isset($stateFromGet->redirect_to)) { $redirectURL = $stateFromGet->redirect_to; } else { $redirectURL = WP_Auth0_Options::get( 'default_login_redirection' ); From c59200c48413dec3cc709ee48c0c3fe99a6423b1 Mon Sep 17 00:00:00 2001 From: German Lena Date: Thu, 21 May 2015 10:48:37 -0300 Subject: [PATCH 2/2] updated version --- WP_Auth0.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WP_Auth0.php b/WP_Auth0.php index 1d2110258..e4876f19f 100644 --- a/WP_Auth0.php +++ b/WP_Auth0.php @@ -2,7 +2,7 @@ /** * Plugin Name: Wordpress Auth0 Integration * Description: Implements the Auth0 Single Sign On solution into Wordpress - * Version: 1.2.3 + * Version: 1.2.4 * Author: Auth0 * Author URI: https://auth0.com */ @@ -12,7 +12,7 @@ define('WPA0_PLUGIN_URL', trailingslashit(plugin_dir_url(__FILE__) )); define('WPA0_LANG', 'wp-auth0'); define('AUTH0_DB_VERSION', 2); -define('WPA0_VERSION', '1.2.3'); +define('WPA0_VERSION', '1.2.4'); class WP_Auth0 { public static function init(){