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

Closed
opened 2026-04-14 21:41:45 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/actualbudget/actual/pull/6010

State: closed
Merged: Yes


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
**Original Pull Request:** https://github.com/actualbudget/actual/pull/6010 **State:** closed **Merged:** Yes --- <!-- 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
GiteaMirror added the pull-request label 2026-04-14 21:41:45 -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#20632