[PR #5923] [MERGED] Fix and improvements to password policies #7325

Closed
opened 2026-03-07 21:15:13 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/5923
Author: @Timshel
Created: 6/2/2025
Status: Merged
Merged: 6/2/2025
Merged by: @dani-garcia

Base: mainHead: verifypassword


📝 Commits (1)

  • 19d5f91 Fix and improvements to policies

📊 Changes

4 files changed (+57 additions, -48 deletions)

View changed files

📝 src/api/core/accounts.rs (+4 -4)
📝 src/api/identity.rs (+2 -42)
📝 src/api/mod.rs (+50 -1)
📝 src/db/models/org_policy.rs (+1 -1)

📄 Description

Return the expected MasterPasswordPolicy when calling the user-verification endpoint.
This allows to enforce the policy when unlocking the screen.

And wrapped the min_complexity and min_length in option otherwise when set to null the whole policy was ignored.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dani-garcia/vaultwarden/pull/5923 **Author:** [@Timshel](https://github.com/Timshel) **Created:** 6/2/2025 **Status:** ✅ Merged **Merged:** 6/2/2025 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `verifypassword` --- ### 📝 Commits (1) - [`19d5f91`](https://github.com/dani-garcia/vaultwarden/commit/19d5f91dadc195effa644456f2207d7d31320892) Fix and improvements to policies ### 📊 Changes **4 files changed** (+57 additions, -48 deletions) <details> <summary>View changed files</summary> 📝 `src/api/core/accounts.rs` (+4 -4) 📝 `src/api/identity.rs` (+2 -42) 📝 `src/api/mod.rs` (+50 -1) 📝 `src/db/models/org_policy.rs` (+1 -1) </details> ### 📄 Description Return the expected [MasterPasswordPolicy](https://github.com/bitwarden/clients/blob/main/libs/common/src/auth/models/response/master-password-policy.response.ts) when calling the [user-verification](https://github.com/bitwarden/clients/blob/main/libs/common/src/auth/services/user-verification/user-verification-api.service.ts#L18C14-L18) endpoint. This allows to enforce the policy when unlocking the screen. And wrapped the `min_complexity` and `min_length` in `option` otherwise when set to `null` the whole policy was ignored. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-07 21:15:13 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#7325