[PR #7298] [CLOSED] Fix local attachment download URL for CLI clients #37058

Closed
opened 2026-07-13 21:34:02 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/7298
Author: @puneetdixit200
Created: 6/4/2026
Status: Closed

Base: mainHead: fix-attachment-api-download-url


📝 Commits (1)

  • 95d2a73 Fix local attachment download endpoint

📊 Changes

2 files changed (+37 additions, -4 deletions)

View changed files

📝 src/api/core/ciphers.rs (+19 -3)
📝 src/db/models/attachment.rs (+18 -1)

📄 Description

Fixes #7281.

Summary

  • return filesystem-backed attachment URLs through /api/ciphers/attachment/download?token=..., matching the current Bitwarden server endpoint used by CLI clients
  • add the matching API route that decodes the existing signed file download token and serves the local attachment file
  • keep the legacy /attachments/<cipher>/<file>?token=... route in place for older clients

Checks

  • cargo fmt --check
  • git diff --check

Notes

  • cargo check --features sqlite and the focused attachment URL unit test did not complete locally; both stalled in the final vaultwarden crate build after dependencies had already compiled.

🔄 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/7298 **Author:** [@puneetdixit200](https://github.com/puneetdixit200) **Created:** 6/4/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-attachment-api-download-url` --- ### 📝 Commits (1) - [`95d2a73`](https://github.com/dani-garcia/vaultwarden/commit/95d2a73671b06869646b037c5a81e7e1c276031d) Fix local attachment download endpoint ### 📊 Changes **2 files changed** (+37 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/api/core/ciphers.rs` (+19 -3) 📝 `src/db/models/attachment.rs` (+18 -1) </details> ### 📄 Description Fixes #7281. ## Summary - return filesystem-backed attachment URLs through `/api/ciphers/attachment/download?token=...`, matching the current Bitwarden server endpoint used by CLI clients - add the matching API route that decodes the existing signed file download token and serves the local attachment file - keep the legacy `/attachments/<cipher>/<file>?token=...` route in place for older clients ## Checks - `cargo fmt --check` - `git diff --check` ## Notes - `cargo check --features sqlite` and the focused attachment URL unit test did not complete locally; both stalled in the final `vaultwarden` crate build after dependencies had already compiled. --- <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-07-13 21:34:02 -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#37058