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

Mark password expired error message as safe #8275

Merged
merged 1 commit into from
Mar 27, 2024
Merged

Conversation

niqjohnson
Copy link
Member

Wagtail no longer marks error messages as safe by default, which has broken a link we've had in our custom password expiration error message for a while. This PR just marks that error message as safe so the link renders correctly.


Changes

  • Mark our custom password expiration error message as safe so the link to the reset password page renders

How to test this PR

  1. Try logging in at localhost:8000/admin/login/ with a user who has an expired password (or you can change if timezone.now() - latest_password.created >= timedelta( to if timezone.now() - latest_password.created <= timedelta( in cfgov/login/forms.py line 40 to trigger the message on any non-expired login)
  2. Confirm the "reset your password" link renders like in the screenshot and points to /admin/password_reset/

Screenshots

wagtail-error

Checklist

  • PR has an informative and human-readable title
    • PR titles are used to generate the change log in releases; good ones make that easier to scan.
    • Consider prefixing, e.g., "Mega Menu: fix layout bug", or "Docs: Update Docker installation instructions".
  • Changes are limited to a single goal (no scope creep)
  • Code follows the standards laid out in the CFPB development guidelines

@niqjohnson niqjohnson requested a review from willbarton March 27, 2024 18:54
@niqjohnson niqjohnson enabled auto-merge March 27, 2024 19:00
@niqjohnson niqjohnson added this pull request to the merge queue Mar 27, 2024
Merged via the queue into main with commit c0642da Mar 27, 2024
13 checks passed
@niqjohnson niqjohnson deleted the fix-reset-error-message branch March 27, 2024 19:20
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.

2 participants