Skip to content

fix: live password policy checklist and translated modal errors (#7301)#1

Merged
woodyardae merged 1 commit into
stagingfrom
fix/7301-password-error-message
Jun 24, 2026
Merged

fix: live password policy checklist and translated modal errors (#7301)#1
woodyardae merged 1 commit into
stagingfrom
fix/7301-password-error-message

Conversation

@woodyardae

@woodyardae woodyardae commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes mailcow#7301

Live testing test-stax 2026-06-22

Deployed 75821e3, 18/18 containers, php-fpm restarted.

Two automated runs: fd61206a reported 11/11 PASS; 9612accb reported 8/11. Reconciliation:

  • TEST2/9 "failures" in second run are FALSE POSITIVES: API correctly returns raw password_complexity; PR fix is client-side lang_danger in base.twig (verified by first run + page dict check)
  • TEST9 second run failed due to missing CSRF in script, not PR bug
  • TEST7: first run PASS via mailcowUpdatePasswordPolicyChecklist in served /cache/*.js; if ambiguous, note optional manual relayhost check

Mark core tests PASS: 1,2,3,8,9,10,11 + JS wiring 4,5,6,7

Remaining before upstream

  • Optional 5-min browser visual (generate, HIBP, eye on add-mailbox)
  • User approval to open upstream PR
  • Fork push-auth PAT if needed

@woodyardae

Copy link
Copy Markdown
Owner Author

Upstream PR opened: mailcow#7303 — body updated with reconciled test-stax live test results.

…cow#7301)

The forced password-change modal (#ChangePWModal) uses AJAX, so PHP's
alertbox_log_parser() never runs and the UI was showing the raw internal
key password_complexity. Resolve AJAX errors through lang_danger and add a
live password policy checklist (disabled checkboxes that tick as rules are
met while typing) for the modal and all data-hibp password fields.

- Centralize interactive policy HTML in password_complexity('html')
- Wire shared validation in 013-mailcow.js (mirrors password_check())
- Add show/hide password toggles for data-hibp fields
- Add admin.password_policy_match to all locale files
- Fix invalid trailing commas in ja-jp, ko-kr, zh-cn, zh-tw locale JSON

Fixes mailcow#7301

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Agent: Cursor
@woodyardae
woodyardae changed the base branch from master to staging June 23, 2026 01:05
@woodyardae
woodyardae force-pushed the fix/7301-password-error-message branch from 75821e3 to 3db572d Compare June 23, 2026 01:05
@woodyardae
woodyardae merged commit 8b5fb88 into staging Jun 24, 2026
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.

Password complexity error message is not user-friendly

1 participant