[PR #4744] [MERGED] Fix for RSA Keys which are read only #23014

Closed
opened 2026-05-16 05:42:31 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/4744
Author: @BlackDex
Created: 7/14/2024
Status: Merged
Merged: 7/17/2024
Merged by: @dani-garcia

Base: mainHead: fix-rsa-key-read-only


📝 Commits (3)

  • 798c2f2 Fix for RSA Keys which are read only
  • 5c1dec9 Updated code to work atomically
  • 5fbeaae Fix spelling

📊 Changes

2 files changed (+29 additions, -22 deletions)

View changed files

📝 src/auth.rs (+25 -17)
📝 src/main.rs (+4 -5)

📄 Description

Sometimes an RSA Key file could be read only.
We currently failed because we also wanted to write. Added an extra check if the file exists already and is not 0 in size. If it does already exists and is larger then 0, then open in read only mode.

Fixes #4644


🔄 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/4744 **Author:** [@BlackDex](https://github.com/BlackDex) **Created:** 7/14/2024 **Status:** ✅ Merged **Merged:** 7/17/2024 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `fix-rsa-key-read-only` --- ### 📝 Commits (3) - [`798c2f2`](https://github.com/dani-garcia/vaultwarden/commit/798c2f274bc14b329d202957f250c88c7967c728) Fix for RSA Keys which are read only - [`5c1dec9`](https://github.com/dani-garcia/vaultwarden/commit/5c1dec98966ad3be9dc29e3d4dace86c4bfd782b) Updated code to work atomically - [`5fbeaae`](https://github.com/dani-garcia/vaultwarden/commit/5fbeaae072dc698db65b67312d66ed2b3e6904ec) Fix spelling ### 📊 Changes **2 files changed** (+29 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `src/auth.rs` (+25 -17) 📝 `src/main.rs` (+4 -5) </details> ### 📄 Description Sometimes an RSA Key file could be read only. We currently failed because we also wanted to write. Added an extra check if the file exists already and is not 0 in size. If it does already exists and is larger then 0, then open in read only mode. Fixes #4644 --- <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-05-16 05:42:31 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#23014