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

Resend Password Utility #1169

Merged
merged 2 commits into from
May 22, 2024
Merged

Resend Password Utility #1169

merged 2 commits into from
May 22, 2024

Conversation

bbengfort
Copy link
Collaborator

@bbengfort bbengfort commented May 22, 2024

Scope of changes

Adds a reissuer helper command to resend the PKCS12 password of the last certificate request (if the user lost it or it expired and so long as the password is still in Google Secret manager).

Also fixes the wording of the email to be less confusing and the & bug referred to us by Bitonic.

Fixes SC-24910 and SC-25491

Type of change

  • bug fix
  • new feature
  • documentation
  • other (describe)

Acceptance criteria

Please pay special attention to wording and HTML in the email templates.

Author checklist

  • I have manually tested the change and/or added automation in the form of unit tests or integration tests
  • I have updated the dependencies list
  • I have recompiled and included new protocol buffers to reflect changes I made
  • I have added new test fixtures as needed to support added tests
  • Check this box if a reviewer can merge this pull request after approval (leave it unchecked if you want to do it yourself)
  • I have moved the associated Shortcut story to "Ready for Review"

Reviewer(s) checklist

  • Any new user-facing content that has been added for this PR has been QA'ed to ensure correct grammar, spelling, and understandability.

@bbengfort bbengfort requested a review from daniellemaxwell May 22, 2024 17:00
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This file can be ignored for your review. This is just the resend password utility that I wrote to get the PKCS12 password back to Nikolay.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This file can also be ignored, it is generated using go generate from the html and txt email template files.

@@ -47,27 +47,32 @@ type VerifyContactData struct {
// VerifyContactURL composes the link to verify the contact from the context. If the
// link is not able to be composed, the function returns an empty string and logs an
// error because without the link the email is fairly useless.
func (d VerifyContactData) VerifyContactURL() string {
func (d VerifyContactData) VerifyContactURL() *url.URL {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changing this to a URL will fix future problems with URLs and ensure proper encoding … we should use url.URL in all of our templates instead of string.

Comment on lines +73 to +75
func (d VerifyContactData) VerifyContactURLUnencoded() template.HTML {
url := d.VerifyContactURL()
return template.HTML(url.String())
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is the equivalent of safeHTML in hugo -- it keeps the & as & instead of & -- I'm using it only for text not for a href based on my reading of the HTML5 spec.

Copy link
Collaborator

@daniellemaxwell daniellemaxwell left a comment

Choose a reason for hiding this comment

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

Nice work on receiving a user's feedback and quickly making changes to the email copy! I'm also sure the resend password utility will continue to be helpful.

@daniellemaxwell daniellemaxwell merged commit 7526b28 into main May 22, 2024
15 checks passed
@daniellemaxwell daniellemaxwell deleted the resend-password branch May 22, 2024 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants