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

If user deleted in wordpress, need to invalid/expire token/ user not exist response #305

Open
vinaye42 opened this issue Jun 8, 2024 · 1 comment

Comments

@vinaye42
Copy link

vinaye42 commented Jun 8, 2024

we got a report of a critical security issue in your plugin. If the user is deleted in wordpress, but the session in the app is still active,

You have to check in validate token if user exist or not like below image

user-exists

/** check user exist or not */
if( isset($token->data->user->id) ) {
	$user = get_userdata($token->data->user->id);
	
	if ( ! $user ) {
		return new WP_Error(
			'jwt_auth_bad_request',
			'User not found',
			[
				'status' => 403,
			]
		);
	}
}
@vinaye42
Copy link
Author

hi @Tmeister,
Plz check the above issue

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

1 participant