-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
feat: expand password regex to allow . and ? characters
#8005
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
Conversation
feat: expand password regex to allow `.` and `?` characters
feat: expand password regex to allow `.` and `?` characters
feat: expand password regex to allow `.` and `?` characters
feat: expand password regex to allow `.` and `?` characters
feat: expand password regex to allow `.` and `?` characters
feat: expand password regex to allow `.` and `?` characters
feat: expand password regex to allow `.` and `?` characters
feat: expand password regex to allow `.` and `?` characters
Update ValidationUtils.java
Update password_reset_email_reset.properties
Update regex.ts
Update password_reset_email_reset_es.properties
Update messages_zh.properties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR expands password validation to allow two additional special characters (. and ?) in user passwords, improving flexibility for users when setting passwords. The regex pattern has been updated in both frontend (TypeScript) and backend (Java) code, along with corresponding user-facing messages across multiple language files.
Key Changes:
- Updated regex pattern from
^[A-Za-z0-9!@#$%^&*]+$to^[A-Za-z0-9!@#$%^&*.?]+$ - Updated user-facing messages in English, Spanish, Traditional Chinese, and Simplified Chinese
- Updated code comments to reflect the new allowed characters
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ui/src/constants/regex.ts | Updated frontend password regex to include . and ? characters |
| api/src/main/java/run/halo/app/infra/ValidationUtils.java | Updated backend password regex and documentation comment |
| application/src/main/resources/config/i18n/messages_zh.properties | Updated Simplified Chinese validation error message |
| application/src/main/resources/templates/gateway_fragments/password_reset_email_reset.properties | Updated Simplified Chinese password reset tips |
| application/src/main/resources/templates/gateway_fragments/password_reset_email_reset_en.properties | Updated English password reset tips |
| application/src/main/resources/templates/gateway_fragments/password_reset_email_reset_es.properties | Updated Spanish password reset tips |
| application/src/main/resources/templates/gateway_fragments/password_reset_email_reset_zh_TW.properties | Updated Traditional Chinese password reset tips |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...ication/src/main/resources/templates/gateway_fragments/password_reset_email_reset.properties
Outdated
Show resolved
Hide resolved
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8005 +/- ##
============================================
+ Coverage 59.55% 60.94% +1.38%
- Complexity 3812 3928 +116
============================================
Files 677 689 +12
Lines 23248 23539 +291
Branches 1500 1523 +23
============================================
+ Hits 13846 14345 +499
+ Misses 8764 8470 -294
- Partials 638 724 +86 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
ruibaby
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ruibaby The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind improvement
What this PR does / why we need it:
This PR expands the password validation rule by allowing the . and ? characters in addition to the existing A-Z, a-z, 0-9, !@#$%^&*.
It improves flexibility for users when setting their passwords.
Which issue(s) this PR fixes:
Special notes for your reviewer:
The regex and its corresponding comment have both been updated to ensure consistency.
Does this PR introduce a user-facing change?