[PR #2795] [CLOSED] automatically purge stale invitations #6791

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

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/2795
Author: @stefan0xC
Created: 10/4/2022
Status: Closed

Base: mainHead: automatically-expire-invitations


📝 Commits (1)

  • 4aceff4 automatically purge stale invitations

📊 Changes

9 files changed (+89 additions, -3 deletions)

View changed files

📝 .env.template (+7 -0)
📝 src/api/core/accounts.rs (+10 -1)
📝 src/api/core/mod.rs (+1 -0)
📝 src/api/mod.rs (+1 -0)
📝 src/auth.rs (+16 -2)
📝 src/config.rs (+5 -0)
📝 src/db/models/organization.rs (+9 -0)
📝 src/db/models/user.rs (+33 -0)
📝 src/main.rs (+7 -0)

📄 Description

Fixes part of #2792 by automatically deleting invited users that have not registered before the expiration date.

INVITATION_EXPIRATION_HOURS defaults to 120 (5 days) because that was the default expiration date of the Invite JWT. When set to 0 the expiration date is not checked.

Also no invitation is deleted 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/2795 **Author:** [@stefan0xC](https://github.com/stefan0xC) **Created:** 10/4/2022 **Status:** ❌ Closed **Base:** `main` ← **Head:** `automatically-expire-invitations` --- ### 📝 Commits (1) - [`4aceff4`](https://github.com/dani-garcia/vaultwarden/commit/4aceff412cbccb94d2de091c30c9afdc1966d36a) automatically purge stale invitations ### 📊 Changes **9 files changed** (+89 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `.env.template` (+7 -0) 📝 `src/api/core/accounts.rs` (+10 -1) 📝 `src/api/core/mod.rs` (+1 -0) 📝 `src/api/mod.rs` (+1 -0) 📝 `src/auth.rs` (+16 -2) 📝 `src/config.rs` (+5 -0) 📝 `src/db/models/organization.rs` (+9 -0) 📝 `src/db/models/user.rs` (+33 -0) 📝 `src/main.rs` (+7 -0) </details> ### 📄 Description Fixes part of #2792 by automatically deleting invited users that have not registered before the expiration date. `INVITATION_EXPIRATION_HOURS` defaults to 120 (5 days) because that was the default expiration date of the Invite JWT. When set to 0 the expiration date is not checked. Also no invitation is deleted when mail is disabled. --- <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:05:17 -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#6791