[PR #4143] [MERGED] Several small fixes for open issues #7023

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

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/4143
Author: @BlackDex
Created: 12/6/2023
Status: Merged
Merged: 12/9/2023
Merged by: @dani-garcia

Base: mainHead: small-fixes


📝 Commits (7)

  • 56d47d9 Fix BWDC when re-run with cleared cache
  • 327a8d7 Remove useless variable
  • fd9a059 Check some .git paths to force a rebuild
  • 15d6520 Do not delete dir on file delete
  • 46fb588 Fix healthcheck when using an ENV file
  • e85ecc4 Add missing route
  • ebb70b9 Update crates to update the openssl crate

📊 Changes

8 files changed (+41 additions, -39 deletions)

View changed files

📝 Cargo.lock (+18 -19)
📝 Cargo.toml (+2 -5)
📝 build.rs (+5 -0)
📝 docker/healthcheck.sh (+10 -0)
📝 src/api/core/ciphers.rs (+3 -5)
📝 src/api/core/emergency_access.rs (+1 -0)
📝 src/db/models/organization.rs (+1 -1)
📝 src/util.rs (+1 -9)

📄 Description

Fix healthcheck when using an ENV file

If someone is using a .env file or configured the ENV_FILE variable
to use that as it's configuration, this was missed by the healthcheck.

So, DOMAIN and ROCKET_TLS were not seen, and not used in these cases.

This commit fixes this by checking for this file and if it exists, then
it will load those variables first.

Fixes #4112


Do not delete dir on file delete

Previously during a delete_file check we also tried to delete the
parent directory and ignored all errors, like not being empty for
example.

Since this function is called delete_file and does not mention
anything in regards to a directory i have removed that code and it will
now only delete the file and leave the rest as-is.

If this somehow is still needed or wanted, which i do not think we want,
then we should create a new function.

Fixes #4081


Check some .git paths to force a rebuild

When a checked-out repo switches to a specific tag, and that tag does
not have anything else changed in the files except the tag, it could
happen that the build process doesn't see any changes, while it could be
that the version string needs to be different.

This commit ensures that if some specific paths are changed within the
.git directory, cargo will be triggered to rebuild.

Fixes #4087


Remove useless variable

During some refactoring this seems to be overlooked.
This variable gets filled but isn't used at all afterwards.

Fixes #4105


Fix BWDC when re-run with cleared cache

Using the BWDC with a cleared cache caused invited users to be converted
to accepted users.

The problem was a wrong check for the restore function.

Fixes #4114


Add missing route

While there was a function and a derive, this endpoint wasn't part of
the routes. Since Bitwarden does have this endpoint ill add the route
instead of deleting it.

Fixes #4076
Fixes #4144


Update crates to update the openssl crate

Because of a bug in the openssl-sys crate we pinned the version to an
older version. This issue has been fixed and was released 2 days ago.

This commit updates the openssl crates including others.
This should also fix the issues with building Vaultwarden using newer
versions of LibreSSL.

And also fixes the security/dependabot tickets.

Fixes #4051


🔄 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/4143 **Author:** [@BlackDex](https://github.com/BlackDex) **Created:** 12/6/2023 **Status:** ✅ Merged **Merged:** 12/9/2023 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `small-fixes` --- ### 📝 Commits (7) - [`56d47d9`](https://github.com/dani-garcia/vaultwarden/commit/56d47d94f7205c14e2f1bc172e4e69b1dff12a0e) Fix BWDC when re-run with cleared cache - [`327a8d7`](https://github.com/dani-garcia/vaultwarden/commit/327a8d7b8fb927468a18a0eca17fd51b3ff1ddc2) Remove useless variable - [`fd9a059`](https://github.com/dani-garcia/vaultwarden/commit/fd9a0597d8c916a77f3b8ea511931df1a3a99d83) Check some `.git` paths to force a rebuild - [`15d6520`](https://github.com/dani-garcia/vaultwarden/commit/15d652088edba36793b400b1e9b1dc455ed03f72) Do not delete dir on file delete - [`46fb588`](https://github.com/dani-garcia/vaultwarden/commit/46fb588f37d9576ee0e398411547a431a14168e6) Fix healthcheck when using an ENV file - [`e85ecc4`](https://github.com/dani-garcia/vaultwarden/commit/e85ecc441227df08d931c02853f855f230dd914d) Add missing route - [`ebb70b9`](https://github.com/dani-garcia/vaultwarden/commit/ebb70b99a4378f43d41b8d21e7f6235575da9af6) Update crates to update the openssl crate ### 📊 Changes **8 files changed** (+41 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+18 -19) 📝 `Cargo.toml` (+2 -5) 📝 `build.rs` (+5 -0) 📝 `docker/healthcheck.sh` (+10 -0) 📝 `src/api/core/ciphers.rs` (+3 -5) 📝 `src/api/core/emergency_access.rs` (+1 -0) 📝 `src/db/models/organization.rs` (+1 -1) 📝 `src/util.rs` (+1 -9) </details> ### 📄 Description ### Fix healthcheck when using an ENV file If someone is using a `.env` file or configured the `ENV_FILE` variable to use that as it's configuration, this was missed by the healthcheck. So, `DOMAIN` and `ROCKET_TLS` were not seen, and not used in these cases. This commit fixes this by checking for this file and if it exists, then it will load those variables first. Fixes #4112 --- ### Do not delete dir on file delete Previously during a `delete_file` check we also tried to delete the parent directory and ignored all errors, like not being empty for example. Since this function is called `delete_file` and does not mention anything in regards to a directory i have removed that code and it will now only delete the file and leave the rest as-is. If this somehow is still needed or wanted, which i do not think we want, then we should create a new function. Fixes #4081 --- ### Check some `.git` paths to force a rebuild When a checked-out repo switches to a specific tag, and that tag does not have anything else changed in the files except the tag, it could happen that the build process doesn't see any changes, while it could be that the version string needs to be different. This commit ensures that if some specific paths are changed within the .git directory, cargo will be triggered to rebuild. Fixes #4087 --- ### Remove useless variable During some refactoring this seems to be overlooked. This variable gets filled but isn't used at all afterwards. Fixes #4105 --- ### Fix BWDC when re-run with cleared cache Using the BWDC with a cleared cache caused invited users to be converted to accepted users. The problem was a wrong check for the `restore` function. Fixes #4114 --- ### Add missing route While there was a function and a derive, this endpoint wasn't part of the routes. Since Bitwarden does have this endpoint ill add the route instead of deleting it. Fixes #4076 Fixes #4144 --- ### Update crates to update the openssl crate Because of a bug in the openssl-sys crate we pinned the version to an older version. This issue has been fixed and was released 2 days ago. This commit updates the openssl crates including others. This should also fix the issues with building Vaultwarden using newer versions of LibreSSL. And also fixes the security/dependabot tickets. Fixes #4051 --- <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:09:44 -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#7023