Skip to content

Update add_email to build its URL once and re-use it#7021

Merged
zachmargolis merged 1 commit intomainfrom
margolis-user-mailer-email-cleanups
Sep 26, 2022
Merged

Update add_email to build its URL once and re-use it#7021
zachmargolis merged 1 commit intomainfrom
margolis-user-mailer-email-cleanups

Conversation

@zachmargolis
Copy link
Copy Markdown
Contributor

[skip changelog]

- Follow-up to #7019 to prevent similar bugs in the future

[skip changelog]
<center>
<%= link_to t('user_mailer.email_confirmation_instructions.link_text'),
add_email_confirmation_url(
_request_id: @request_id,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, @request_id was never assigned... so it's always been nil in this email (it does get used in email_confirmation_instructions but that's a separate one)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it would typically only be used to tie an SP auth request across browsers (register email on device1, confirm on device2, and still be able to continue to SP on device2) which doesn't super apply for adding an email address to an existing account.

@zachmargolis zachmargolis merged commit 7d0115f into main Sep 26, 2022
@zachmargolis zachmargolis deleted the margolis-user-mailer-email-cleanups branch September 26, 2022 14:34
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.

3 participants