Tmeister / wp-api-jwt-auth

A simple plugin to add JSON Web Token (JWT) Authentication to WP REST API
GNU General Public License v2.0
546 stars 160 forks source link

PHP Warning: Undefined array key "REDIRECT_HTTP_AUTHORIZATION" #263

Closed gassan closed 10 months ago

gassan commented 1 year ago

Bugfix: isset() check is missed.

austenmc commented 1 year ago

Thanks for putting this up. This is affecting pretty much every REST API call not using Bearer authentication. For example...

GET /wp-json/wp/v2/users
Notice: Undefined index: HTTP_AUTHORIZATION in /var/www/staging/wp-content/plugins/jwt-authentication-for-wp-rest-api/public/class-jwt-auth-public.php on line 222

Notice: Undefined index: REDIRECT_HTTP_AUTHORIZATION in /var/www/staging/wp-content/plugins/jwt-authentication-for-wp-rest-api/public/class-jwt-auth-public.php on line 225

Please consider merging :)

Tmeister commented 10 months ago

Thank you.

This was fixed on the last release.

https://github.com/Tmeister/wp-api-jwt-auth/releases/tag/1.3.3