Changeset 7695
- Timestamp:
- 09/24/2018 03:45:23 AM (6 years ago)
- Location:
- sites/trunk/common/includes/wporg-sso
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/common/includes/wporg-sso/class-wporg-sso.php
r7689 r7695 44 44 // If on the SSO host, add the requesting source (eg: make.wordpress.org), if within our bounds 45 45 $url = parse_url( $this->_get_safer_redirect_to() ); 46 $host = ( empty( $url) ) ? null : $url['host'];46 $host = ( ! $url || ! isset( $url['host'] ) ) ? null : $url['host']; 47 47 } else { 48 48 // If not on the SSO host, add login.wordpress.org, to be safe -
sites/trunk/common/includes/wporg-sso/wp-plugin.php
r7648 r7695 232 232 return; 233 233 } 234 } else if ( is_user_logged_in() && 'logout' == self::$matched_route ) { 235 // No redirect, ask the user if they really want to log out. 236 return; 234 237 } else if ( is_user_logged_in() ) { 235 if ( preg_match( '!^' . $this->valid_sso_paths['logout'] . '/?$!', $_SERVER['REQUEST_URI'] ) ) { 236 // No redirect, ask the user if they really want to log out. 237 return; 238 } else { 239 // Otherwise, redirect to the login screen. 240 $this->_redirect_to_profile(); 241 } 238 // Otherwise, redirect to the their profile. 239 $this->_redirect_to_profile(); 242 240 } 243 241 } elseif ( ( is_admin() && is_super_admin() ) || 0 === strpos( $_SERVER['REQUEST_URI'], '/wp-json' ) || 0 === strpos( $_SERVER['REQUEST_URI'], '/xmlrpc.php' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.