| @@ -109,7 +109,8 @@ | ||
| 109 | 109 | * |
| 110 | 110 | * @return bool |
| 111 | 111 | */ |
| 112 | 112 | public function verify_rest_request( WP_REST_Request $request ): bool { |
| 113 | - return $request->get_header( 'Access-Control' ) === $this->get_local_token(); | |
| 113 | + $token = $this->get_local_token(); | |
| 114 | + return '' !== $token && hash_equals( $token, (string) $request->get_header( 'Access-Control' ) ); | |
| 114 | 115 | } |
| 115 | 116 | } |