There was an error while loading. Please reload this page.
1 parent c3d0b32 commit 5317415Copy full SHA for 5317415
1 file changed
includes/classes/MyDot/Connector.php
@@ -1061,6 +1061,12 @@ public static function validate_jwt_token_in_request_with_fallback( $request ) {
1061
$parts = null !== $auth_header ? explode( ' ', $auth_header ) : [];
1062
if ( ! empty( $auth_header ) ) {
1063
if ( count( $parts ) === 2 && 'Bearer' === $parts[0] ) {
1064
+ // Check if the site is registered currently before attempting validation.
1065
+ $site_id = get_option( 'edac_site_id' );
1066
+ if ( empty( $site_id ) ) {
1067
+ return false;
1068
+ }
1069
+
1070
// Use the fallback validator which will refresh key if needed.
1071
return self::validate_jwt_token_with_fallback( $parts[1] );
1072
}
0 commit comments