[PR #4263] [MERGED] err on invalid feature flag #3366

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

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/4263
Author: @stefan0xC
Created: 1/21/2024
Status: Merged
Merged: 1/29/2024
Merged by: @dani-garcia

Base: mainHead: err-on-invalid-flag


📝 Commits (2)

  • e30fbc6 err on invalid feature flag
  • 5564dc8 print all invalid flags and improve error message

📊 Changes

1 file changed (+7 additions, -4 deletions)

View changed files

📝 src/config.rs (+7 -4)

📄 Description

As mentioned in the PR https://github.com/dani-garcia/vaultwarden/pull/4168#discussion_r1431892943 we have to err! to disallow unknown flags otherwise all flags are allowed.

I've just tested it and the warning is not even displayed. Might be the same reason as
890e668071/src/config.rs (L128)


🔄 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/4263 **Author:** [@stefan0xC](https://github.com/stefan0xC) **Created:** 1/21/2024 **Status:** ✅ Merged **Merged:** 1/29/2024 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `err-on-invalid-flag` --- ### 📝 Commits (2) - [`e30fbc6`](https://github.com/dani-garcia/vaultwarden/commit/e30fbc6dfcb4f57a2345a9a33fb4888b162cfd37) err on invalid feature flag - [`5564dc8`](https://github.com/dani-garcia/vaultwarden/commit/5564dc8f84bd2794e928d7b960d62e6a0d735862) print all invalid flags and improve error message ### 📊 Changes **1 file changed** (+7 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/config.rs` (+7 -4) </details> ### 📄 Description As mentioned in the PR https://github.com/dani-garcia/vaultwarden/pull/4168#discussion_r1431892943 we have to `err!` to disallow unknown flags otherwise all flags are allowed. I've just tested it and the warning is not even displayed. Might be the same reason as https://github.com/dani-garcia/vaultwarden/blob/890e668071cffe2833834348e19bbef3c061d014/src/config.rs#L128 --- <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:25:16 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#3366