Skip to content

Conversation

@xzyone
Copy link
Contributor

@xzyone xzyone commented Dec 10, 2025

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?

用户密码允许输入 . 和 ?

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 password_reset_email_reset_es.properties
Update messages_zh.properties
@f2c-ci-robot f2c-ci-robot bot added kind/improvement Categorizes issue or PR as related to a improvement. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Dec 10, 2025
@ruibaby ruibaby requested a review from Copilot December 11, 2025 14:24
@ruibaby ruibaby added the area/core Issues or PRs related to the Halo Core label Dec 11, 2025
@ruibaby ruibaby added this to the 2.22.x milestone Dec 11, 2025
@f2c-ci-robot f2c-ci-robot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Dec 11, 2025
Copy link
Contributor

Copilot AI left a 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.

@codecov
Copy link

codecov bot commented Dec 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.94%. Comparing base (42c374d) to head (41546e1).
⚠️ Report is 300 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sonarqubecloud
Copy link

Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

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

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Dec 12, 2025
@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Dec 12, 2025

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 12, 2025
@f2c-ci-robot f2c-ci-robot bot merged commit ddd0453 into halo-dev:main Dec 12, 2025
15 of 16 checks passed
@ruibaby ruibaby modified the milestones: 2.22.x, 2.22.0 Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants