When a user has an unconfirmed emergency-access user, and tries to do a key-rotation, the validation fails. The reason is that Bitwarden only returns new keys for confirmed users, not for invited or accepted.
This commit fixes this by only requesting confirmed or higher status emergency-access users.
🔄 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/6421
**Author:** [@BlackDex](https://github.com/BlackDex)
**Created:** 11/1/2025
**Status:** ✅ Merged
**Merged:** 11/1/2025
**Merged by:** [@dani-garcia](https://github.com/dani-garcia)
**Base:** `main` ← **Head:** `fix-key-rotation`
---
### 📝 Commits (1)
- [`9d68045`](https://github.com/dani-garcia/vaultwarden/commit/9d68045a2e8e79eb4408511d5f229e0b283cc545) Fix issue with key-rotation and emergency-access
### 📊 Changes
**2 files changed** (+11 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `src/api/core/accounts.rs` (+1 -1)
📝 `src/db/models/emergency_access.rs` (+10 -0)
</details>
### 📄 Description
When a user has an unconfirmed emergency-access user, and tries to do a key-rotation, the validation fails. The reason is that Bitwarden only returns new keys for confirmed users, not for invited or accepted.
This commit fixes this by only requesting confirmed or higher status emergency-access users.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/6421
Author: @BlackDex
Created: 11/1/2025
Status: ✅ Merged
Merged: 11/1/2025
Merged by: @dani-garcia
Base:
main← Head:fix-key-rotation📝 Commits (1)
9d68045Fix issue with key-rotation and emergency-access📊 Changes
2 files changed (+11 additions, -1 deletions)
View changed files
📝
src/api/core/accounts.rs(+1 -1)📝
src/db/models/emergency_access.rs(+10 -0)📄 Description
When a user has an unconfirmed emergency-access user, and tries to do a key-rotation, the validation fails. The reason is that Bitwarden only returns new keys for confirmed users, not for invited or accepted.
This commit fixes this by only requesting confirmed or higher status emergency-access users.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.