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

Fix for when sanitizer removes user.email #8

Merged
merged 1 commit into from Jul 13, 2022
Merged

Fix for when sanitizer removes user.email #8

merged 1 commit into from Jul 13, 2022

Conversation

GraemeFulton
Copy link
Contributor

This sanitizer removes the user.email:
https://github.com/kucherenko/strapi-plugin-passwordless/blob/main/server/services/passwordless.js#L166

and because email is null, this check fails:
https://github.com/kucherenko/strapi-plugin-passwordless/blob/main/server/controllers/auth.js#L107

#5 (comment)

I don't know the cause, but the sanitizer could have been modified somewhere else in Strapi (maybe another plugin?).
That change will ensure the email is always returned

just saw on the readme pull requests are welcome, so here you go!

This sanitizer removes the user.email:
https://github.com/kucherenko/strapi-plugin-passwordless/blob/main/server/services/passwordless.js#L166

and because email is null, this check fails:
https://github.com/kucherenko/strapi-plugin-passwordless/blob/main/server/controllers/auth.js#L107

#5 (comment)

I don't know the cause, but the sanitizer could have been modified somewhere else in Strapi (maybe another plugin?). 
That change will ensure the email is always returned
@kucherenko kucherenko merged commit 390fca9 into kucherenko:main Jul 13, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants