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

🐛 [Bug] Email Verification Sends Out Wrong Link #4339

Closed
Mogge opened this issue Apr 4, 2021 · 1 comment · Fixed by #4336
Closed

🐛 [Bug] Email Verification Sends Out Wrong Link #4339

Mogge opened this issue Apr 4, 2021 · 1 comment · Fixed by #4336
Assignees
Labels
bug Something isn't working

Comments

@Mogge
Copy link
Contributor

Mogge commented Apr 4, 2021

🐛 Bugreport

The email sent to verify the email address during signup contains a wrong link.
When starting here:

email_entered

You can see, that there is no method given in the URL.

This is en extract of the email the new user receives (please ignore the \n +, I have overseen this when cleaning up):

email

As you can see, there is a huge button shouting CLICK ME in your face, and further below, you see the actual nonce you are asked to enter during signup process.

There are very few users in this world, which would not click on the button and type in the nonce in the form instead.

But now, this is the link the button is pointing to:

http://localhost:3000/registration?method=invite-mail&email=test%40test.org&nonce=71967

And this is what you see, when you click on it:

nonce

You see, now we have a method in the URL, and it is the wrong one! We switched over to another signup method.

The dots do go back to the earlier steps of the registration process disappeared!

The backend has no chance to receive the invite code from this point on, because it does not exist in the frontend anymore.

Steps to reproduce the behavior

  1. Got to http://localhost:3000/registration
  2. Add a line console.log(actionUrl) to line 24 of backend/middleware/email/templateBuilder.js to see the link in the console.
  3. Add a line console.log(signupTemplate({ email, nonce })).html to line 48 of backend/src/middleware/email/emailMiddleware.js to see the email in the console.
  4. Step forward in the registration process until you get the email send.
  5. Check the Link and the Email

Expected behavior

The Link should point to the correct signup method or no link should be provided at all.

@Mogge Mogge added the bug Something isn't working label Apr 4, 2021
@ulfgebhardt ulfgebhardt added this to the 🏃 21/04 April milestone Apr 4, 2021
@Mogge Mogge changed the title 🐛 [Bug] Email VerificationSends Out Wrong Link 🐛 [Bug] Email Verification Sends Out Wrong Link Apr 4, 2021
@Tirokk
Copy link
Member

Tirokk commented Apr 6, 2021

We discussed this all on Thursday @Mogge
See my comment in your PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment