Skip to content

fix: allow legacy weak old password when updating password#126

Merged
tylor-zhang merged 1 commit into
mainfrom
fix/old-password-validation
Jun 15, 2026
Merged

fix: allow legacy weak old password when updating password#126
tylor-zhang merged 1 commit into
mainfrom
fix/old-password-validation

Conversation

@tylor-zhang

Copy link
Copy Markdown
Contributor

Summary

  • 修改密码时不再对 oldPassword 做强度校验,改为仅 @IsString(),由 hash 比对验证旧密码
  • newPassword 仍保持 @IsPassword() 强度要求不变
  • 新增 e2e 用例:legacy 用户用弱旧密码(如 abc123)可成功改密

Test plan

  • npm run test 单元测试通过
  • npm run test:e2e 中 Update user 用例(需 MongoDB)

Made with Cursor

Old users may have passwords set before the current complexity policy.
Skip strength validation on oldPassword and only verify via hash check.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tylor-zhang tylor-zhang merged commit f4d819f into main Jun 15, 2026
4 checks passed
@tylor-zhang tylor-zhang deleted the fix/old-password-validation branch June 15, 2026 02:25
tylor-zhang pushed a commit that referenced this pull request Jun 15, 2026
🤖 I have created a release *beep* *boop*
---


## [2.28.0](v2.27.1...v2.28.0)
(2026-06-15)


### Features

* **sms:** support optional account for volcengine multi-account
([#128](#128))
([18217cb](18217cb))


### Bug Fixes

* allow legacy weak old password when updating password
([#126](#126))
([f4d819f](f4d819f))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

1 participant