[PR #4337] [MERGED] fix emergency access invites #3387

Closed
opened 2026-02-05 05:26:15 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/4337
Author: @stefan0xC
Created: 2/11/2024
Status: Merged
Merged: 4/27/2024
Merged by: @dani-garcia

Base: mainHead: fix-emergency-access


📝 Commits (3)

  • 2487efa fix emergency access invites with no mail
  • ce55f15 delete emergency access invitations
  • e617630 improve missing emergency access grantees

📊 Changes

4 files changed (+78 additions, -60 deletions)

View changed files

📝 src/api/core/accounts.rs (+10 -2)
📝 src/api/core/emergency_access.rs (+20 -49)
📝 src/db/models/emergency_access.rs (+47 -9)
📝 src/db/models/user.rs (+1 -0)

📄 Description

When mail is disabled instead of accepting emergency access for all invited users automatically, we only accept the emergency access invitation immediately if the user already exists and has a password_hash. For invited users any open emergency access invitations will be accepted on registration.

Also prevent invited emergency access contacts to register if emergency access is disabled (this is only relevant for when mail is enabled, if mail is disabled they would have an Invitation entry).

This should address the issue reported in https://github.com/dani-garcia/vaultwarden/discussions/3183 without any breaking changes (i.e. this will not disable the emergency access feature when mail is disabled).


🔄 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/4337 **Author:** [@stefan0xC](https://github.com/stefan0xC) **Created:** 2/11/2024 **Status:** ✅ Merged **Merged:** 4/27/2024 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `fix-emergency-access` --- ### 📝 Commits (3) - [`2487efa`](https://github.com/dani-garcia/vaultwarden/commit/2487efa01518e1fc7dc7e8da390e00ca2b16770f) fix emergency access invites with no mail - [`ce55f15`](https://github.com/dani-garcia/vaultwarden/commit/ce55f15b7fc3a790dc93156c477d28fdc0ce5ad5) delete emergency access invitations - [`e617630`](https://github.com/dani-garcia/vaultwarden/commit/e617630f500ba5afaa911209d8c60cb5cd38e7a9) improve missing emergency access grantees ### 📊 Changes **4 files changed** (+78 additions, -60 deletions) <details> <summary>View changed files</summary> 📝 `src/api/core/accounts.rs` (+10 -2) 📝 `src/api/core/emergency_access.rs` (+20 -49) 📝 `src/db/models/emergency_access.rs` (+47 -9) 📝 `src/db/models/user.rs` (+1 -0) </details> ### 📄 Description When mail is disabled instead of accepting emergency access for all invited users automatically, we only accept the emergency access invitation immediately if the user already exists and has a `password_hash`. For invited users any open emergency access invitations will be accepted on registration. Also prevent invited emergency access contacts to register if emergency access is disabled (this is only relevant for when mail is enabled, if mail is disabled they would have an Invitation entry). This should address the issue reported in https://github.com/dani-garcia/vaultwarden/discussions/3183 without any breaking changes (i.e. this will not disable the emergency access feature when mail is disabled). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 05:26:15 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#3387