Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passwords with special character fail #295

Open
dustbro opened this issue Jan 5, 2024 · 2 comments
Open

Passwords with special character fail #295

dustbro opened this issue Jan 5, 2024 · 2 comments

Comments

@dustbro
Copy link

dustbro commented Jan 5, 2024

Passwords with special character fail login

Context

I’m using JWT to authenticate users from my app, and everything works as expected…. except if the password contains a “ in it. Having a quote in the password returns an error saying the username or password is incorrect.

Is there anything that can fix this other than having the user change their password?

Expected Behavior

The same password that a user has on my wordpress site should work for JWT authentication.

Current Behavior

Having a quote in the password returns an error saying the username or password is incorrect.

@RpGmAx
Copy link

RpGmAx commented Feb 22, 2024

Hi,

Problem fixed with addslashs fx.

$user = wp_authenticate( $username, addslashes($password) );
on line 139 in file class-jwt-auth-public.php

Fix required from author side ;)

@dustbro
Copy link
Author

dustbro commented May 9, 2024

@Tmeister would you be able to add this fix to the next update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants