[PR #2886] [MERGED] redirect to admin login page when forward fails #3145

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

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/2886
Author: @stefan0xC
Created: 11/2/2022
Status: Merged
Merged: 12/2/2022
Merged by: @dani-garcia

Base: mainHead: forward-to-admin-login


📝 Commits (2)

  • fa7dbed redirect to admin login page when forward fails
  • 0aa33a2 don't use param for passing the redirect info

📊 Changes

5 files changed (+57 additions, -53 deletions)

View changed files

📝 src/api/admin.rs (+44 -51)
📝 src/api/mod.rs (+1 -0)
📝 src/main.rs (+1 -0)
📝 src/static/templates/admin/diagnostics.hbs (+7 -1)
📝 src/static/templates/admin/login.hbs (+4 -1)

📄 Description

Currently, if the admin guard fails the user will get a 404 page instead of being forwarded to the login page.

This change addresses issues like #2880 and #2883 by implementing a default forward catcher for all admin pages so this comment is correct:
f60a6929a9/src/api/admin.rs (L656)


🔄 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/2886 **Author:** [@stefan0xC](https://github.com/stefan0xC) **Created:** 11/2/2022 **Status:** ✅ Merged **Merged:** 12/2/2022 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `forward-to-admin-login` --- ### 📝 Commits (2) - [`fa7dbed`](https://github.com/dani-garcia/vaultwarden/commit/fa7dbedd5d878305adbae1c20cd46207f8d45261) redirect to admin login page when forward fails - [`0aa33a2`](https://github.com/dani-garcia/vaultwarden/commit/0aa33a2cb48ee5dbf31a6f448effb41e7467e417) don't use param for passing the redirect info ### 📊 Changes **5 files changed** (+57 additions, -53 deletions) <details> <summary>View changed files</summary> 📝 `src/api/admin.rs` (+44 -51) 📝 `src/api/mod.rs` (+1 -0) 📝 `src/main.rs` (+1 -0) 📝 `src/static/templates/admin/diagnostics.hbs` (+7 -1) 📝 `src/static/templates/admin/login.hbs` (+4 -1) </details> ### 📄 Description Currently, if the admin guard fails the user will get a 404 page instead of being forwarded to the login page. This change addresses issues like #2880 and #2883 by implementing a default forward catcher for all admin pages so this comment is correct: https://github.com/dani-garcia/vaultwarden/blob/f60a6929a9a289bd39c38eeb793ebf54c4d88199/src/api/admin.rs#L656 --- <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:14:52 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#3145