[PR #6010] [MERGED] ☁️ Fix server sync file download when server-files are in .config #40700

Closed
opened 2026-04-23 13:31:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/6010
Author: @MikesGlitch
Created: 10/27/2025
Status: Merged
Merged: 10/27/2025
Merged by: @MikesGlitch

Base: masterHead: fix-server-sync-on-linux-when-data-in-config


📝 Commits (6)

  • 66fe3fc fix server sync file download when server-files are in .config directory on linux
  • a3f1bb8 extra security
  • f57d9e2 release notes
  • 0ffc4fd putting it back after testing
  • d07540f also accounting for directories
  • d4a4744 derp

📊 Changes

3 files changed (+19 additions, -1 deletions)

View changed files

📝 packages/desktop-client/.gitignore (+3 -0)
📝 packages/sync-server/src/app-sync.ts (+10 -1)
upcoming-release-notes/6010.md (+6 -0)

📄 Description

I was seeing some file access issues on Linux when the server-files are in the home .confg directory.

In Express, res.sendFile was erroring, but reading the file manually was working. I don't really understand what broke it, but it doesn't seem permission related due to the fact I can read the file with fs.readFile. Maybe it's a bug in Express 🤷‍♂️

This fixes it, and also fixes a security issue related to uncontrolled paths.

To replicate:

  • Start electron on linux (easiest to replicate on electron but also visible when building from source/CLI)
  • Start the sync-server (server files are held in .config/ActualBudget directory)
  • Open up a browser and point to the sync server
  • Download the budget

Tested on:

  • Linux
  • Windows
  • Mac

🔄 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/actualbudget/actual/pull/6010 **Author:** [@MikesGlitch](https://github.com/MikesGlitch) **Created:** 10/27/2025 **Status:** ✅ Merged **Merged:** 10/27/2025 **Merged by:** [@MikesGlitch](https://github.com/MikesGlitch) **Base:** `master` ← **Head:** `fix-server-sync-on-linux-when-data-in-config` --- ### 📝 Commits (6) - [`66fe3fc`](https://github.com/actualbudget/actual/commit/66fe3fc0bff32522d96e0f6287bf04a55c3efa75) fix server sync file download when server-files are in .config directory on linux - [`a3f1bb8`](https://github.com/actualbudget/actual/commit/a3f1bb864495f5148e8589d2b2ba12f2c2a42967) extra security - [`f57d9e2`](https://github.com/actualbudget/actual/commit/f57d9e224bbccbeb64b620ad637beef3f920c94e) release notes - [`0ffc4fd`](https://github.com/actualbudget/actual/commit/0ffc4fd9440aae8e6ab451ea88a88319e4ce864e) putting it back after testing - [`d07540f`](https://github.com/actualbudget/actual/commit/d07540ff74a689d4924f1dc9325cd9bcbd359e87) also accounting for directories - [`d4a4744`](https://github.com/actualbudget/actual/commit/d4a4744ba454fe832504b0d41ef064c2a55ab3d3) derp ### 📊 Changes **3 files changed** (+19 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/.gitignore` (+3 -0) 📝 `packages/sync-server/src/app-sync.ts` (+10 -1) ➕ `upcoming-release-notes/6010.md` (+6 -0) </details> ### 📄 Description <!-- Thank you for submitting a pull request! Make sure to follow the instructions to write release notes for your PR — it should only take a minute or two: https://github.com/actualbudget/docs#writing-good-release-notes. Try running yarn generate:release-notes *before* pushing your PR for an interactive experience. --> I was seeing some file access issues on Linux when the server-files are in the home .confg directory. In Express, `res.sendFile` was erroring, but reading the file manually was working. I don't really understand what broke it, but it doesn't seem permission related due to the fact I can read the file with fs.readFile. Maybe it's a bug in Express :man_shrugging: This fixes it, and also fixes a security issue related to uncontrolled paths. To replicate: - Start electron on linux (easiest to replicate on electron but also visible when building from source/CLI) - Start the sync-server (server files are held in .config/ActualBudget directory) - Open up a browser and point to the sync server - Download the budget Tested on: - [x] Linux - [x] Windows - [x] Mac --- <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-04-23 13:31:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#40700