[PR #2326] [MERGED] allow running AQL against local database #4252

Closed
opened 2026-02-28 20:53:41 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/2326
Author: @MatissJanis
Created: 2/3/2024
Status: Merged
Merged: 2/5/2024
Merged by: @MatissJanis

Base: masterHead: matiss/local-queries


📝 Commits (3)

📊 Changes

2 files changed (+10 additions, -2 deletions)

View changed files

📝 packages/loot-core/src/server/main.ts (+4 -2)
upcoming-release-notes/2326.md (+6 -0)

📄 Description

Allow running AQL against the local database.

Is this secure?

I think so (but please disagree if you think otherwise).

My argument for allowing this outside dev mode is:

  1. it's a pretty useful feature - especially for support when we need to get some data from the user;
  2. if an attacker gains access to window - he might as well have gotten access to the entire local database, so exposing this new query mechanism isn't really introducing a bigger vector of attack

Sample:

window
  .$query(window.$q('accounts').select('*'))
  .then(({ data }) => console.log(data));

🔄 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/2326 **Author:** [@MatissJanis](https://github.com/MatissJanis) **Created:** 2/3/2024 **Status:** ✅ Merged **Merged:** 2/5/2024 **Merged by:** [@MatissJanis](https://github.com/MatissJanis) **Base:** `master` ← **Head:** `matiss/local-queries` --- ### 📝 Commits (3) - [`5516ebd`](https://github.com/actualbudget/actual/commit/5516ebdd3f873cc71f7146fc5bbdcca639004265) :sparkles: allow running AQL against local database - [`65d8223`](https://github.com/actualbudget/actual/commit/65d822320058367028d88d5b39bc198b1a668d8f) Release notes - [`ff7a972`](https://github.com/actualbudget/actual/commit/ff7a9720b598c388905c6fb3acdd2ed5942d62e9) Release notes ### 📊 Changes **2 files changed** (+10 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/loot-core/src/server/main.ts` (+4 -2) ➕ `upcoming-release-notes/2326.md` (+6 -0) </details> ### 📄 Description Allow running AQL against the local database. **Is this secure?** I think so (but please disagree if you think otherwise). My argument for allowing this outside dev mode is: 1. it's a pretty useful feature - especially for support when we need to get some data from the user; 2. if an attacker gains access to `window` - he might as well have gotten access to the entire local database, so exposing this new query mechanism isn't really introducing a bigger vector of attack --- Sample: ```javascript window .$query(window.$q('accounts').select('*')) .then(({ data }) => console.log(data)); ``` --- <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-02-28 20:53:41 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#4252