Commit Graph
1349 Commits
Author SHA1 Message Date
eitchtee f280fcb172 chore(locale): update translation files
[skip ci] Automatically generated by Django makemessages workflow
2026-09-06 19:42:46 +00:00
Herculino Trotta e2f26b3629 fix(sharing): enforce object-level authorization outside the rules app
The rules endpoints were one instance of a pattern repeated across every
SharedObject-backed app. Route the rest through the same helper.

DCA entries were the worst case and are strictly wider than the reported
rules bug: DCAEntry has an unscoped default manager, so filtering by
strategy__id alone reached entries on strategies the caller could not see
at all. No public or shared strategy was needed -- only a guessable
integer. strategy_entry_add/edit/delete now resolve through the parent
strategy with via="strategy".

Every SharedObject delete view carried an inverted condition:

    if obj.owner != request.user and request.user in obj.shared_with.all():
        obj.shared_with.remove(request.user)
    else:
        obj.delete()

An object its owner had made public matched neither branch's intent and
fell through to delete(), so any authenticated user could destroy it.
Confirmed reachable for accounts, account groups, categories, tags,
entities and DCA strategies. The owner now deletes, a shared user revokes
only their own access, and anyone else gets a 403.

The API viewsets had no object-level check at all. DjangoModelPermissions
gated them shut for ordinary users, who hold no model permissions, so this
was not reachable in a default install -- but the check belongs there
regardless, and a user granted change_account in the admin could write any
visible account. SharedObjectPermission adds it for the SharedObject
viewsets, leaving reads to SharedObjectManager.

account_toggle_untracked only flips the calling user's own row in the
untracked_by m2m, so it takes READ rather than EDIT.

Refs GHSA-83g9-vjqf-2j5q
2026-09-01 23:15:41 -03:00
Herculino Trotta 039ad225d3 test(rules): cover object-level authorization for transaction rules
Regression tests for GHSA-83g9-vjqf-2j5q, one per endpoint the advisory
named plus the delete and view paths found alongside them: a non-owner
gets 403 on every mutation of a public or shared rule, and the object is
asserted unchanged afterwards.

Also covers the parts that are easy to regress in the other direction:
shared users keep read access, a shared user deleting only revokes their
own access, unowned rules stay claimable, and children of invisible rules
answer 404 rather than 403.

SharedObjectPredicateParityTests asserts is_visible_to agrees with
SharedObjectManager across every owner/visibility/shared combination.
The manager builds a Q and the predicate tests an instance, so they
cannot share an implementation and can otherwise drift apart.
2026-09-01 21:43:13 -03:00
Herculino Trotta 18d4ab7d11 fix(rules): enforce object-level authorization on rule endpoints
SharedObjectManager scopes querysets to what a user may see, which
includes other people's public and shared-with-them objects. Several
mutating rule endpoints treated that visibility as permission to write.

Generalise get_owned_object_or_403 into get_shared_object_or_error, which
takes an explicit access level instead of inferring one:

- READ requires the object to be visible; denial is 404 so the response
  does not confirm that an id exists.
- EDIT requires ownership; denial is 403, but only after the visibility
  check, so 403 never leaks the existence of an invisible object. This
  matters for TransactionRuleAction, whose manager is unscoped.

The previous owner_path resolved to a User and discarded the object, so
it could not express visibility at all. via= now points at the governing
SharedObject and is resolved with a plain getattr, so an unresolvable
path raises instead of silently granting access.

is_visible_to/is_editable_by replace is_accessible_by, which was never
called and tested visibility == "shared", a value that does not exist in
Visibility.

Also fixes two further holes in the same module:

- transaction_rule_delete fell through to delete() whenever the caller
  was not in shared_with, so any user could delete a public rule. Now
  only the owner deletes; a shared user revokes their own access.
- transaction_rule_view was read-only but is now explicitly READ, so
  rules shared with a user stay viewable.

The activate/deactivate control is hidden for rules the user does not
own, instead of rendering a button that always fails.

Refs GHSA-83g9-vjqf-2j5q
2026-09-01 21:25:46 -03:00
Moshe Levi 68a9286ce5 Fix BOLA on transaction-rule endpoints via get_owned_object_or_403
Add apps.common.functions.get_owned_object_or_403, an ownership-enforcing
variant of get_object_or_404, and apply it across every rules handler that
resolved a TransactionRule / (UpdateOrCreate)TransactionRuleAction from a URL id
without an owner check. Mirrors the check in transaction_rule_edit
(obj.owner and obj.owner != request.user); objects with no owner remain
accessible, preserving existing behaviour. Nested ownership (actions owned via
their parent rule) is handled with owner_path='rule.owner'.
2026-08-31 20:14:40 +03:00
renardspark f60f86a5cb locale(French): update translation
Currently translated at 98.8% (776 of 785 strings)

Translation: WYGIWYH/App
Translate-URL: https://translations.herculino.com/projects/wygiwyh/app/fr/
2026-08-23 16:57:26 +00:00
renardspark 5588eb33b1 locale(French): update translation
Currently translated at 98.8% (776 of 785 strings)

Translation: WYGIWYH/App
Translate-URL: https://translations.herculino.com/projects/wygiwyh/app/fr/
2026-08-23 15:57:24 +00:00
renardspark 934e6bd8e0 locale(French): update translation
Currently translated at 98.8% (776 of 785 strings)

Translation: WYGIWYH/App
Translate-URL: https://translations.herculino.com/projects/wygiwyh/app/fr/
2026-08-23 14:57:25 +00:00
Dimitri Decrock 00f87bea3d locale(Dutch): update translation
Currently translated at 100.0% (785 of 785 strings)

Translation: WYGIWYH/App
Translate-URL: https://translations.herculino.com/projects/wygiwyh/app/nl/
2026-08-17 15:57:28 +00:00
Herculino Trotta 5147d939ef locale(Portuguese (Brazil)): update translation
Currently translated at 100.0% (785 of 785 strings)

Translation: WYGIWYH/App
Translate-URL: https://translations.herculino.com/projects/wygiwyh/app/pt_BR/
2026-08-16 22:03:32 +00:00
eitchtee 716bd6f57f chore(locale): update translation files
[skip ci] Automatically generated by Django makemessages workflow
2026-08-16 04:46:49 +00:00
Herculino Trotta ded4cb37d5 Merge pull request #588 from eitchtee/feat/filter-presets
feat(transactions): add filter presets
2026-08-16 01:46:18 -03:00
Herculino Trotta cd48edddab feat(transactions): add htmx filter presets 2026-08-16 01:40:11 -03:00
Herculino Trotta 9e135560fe feat(transactions): add filter preset model 2026-08-16 01:40:03 -03:00
eitchtee bdbccdec16 chore(locale): update translation files
[skip ci] Automatically generated by Django makemessages workflow
2026-08-15 18:12:40 +00:00
Herculino Trotta 33f0904a0f feat(dca): add chart zoom navigation 2026-08-15 15:10:10 -03:00
eitchtee 1c4f23a69e chore(locale): update translation files
[skip ci] Automatically generated by Django makemessages workflow
2026-08-15 17:43:26 +00:00
Herculino Trotta 8e09f3e8d8 feat(net-worth): add consolidated chart lines 2026-08-15 14:36:13 -03:00
Herculino Trotta 3bd16602a0 fix(tools:calculator): prevent close button from drifiting to the right 2026-08-15 11:41:15 -03:00
Herculino Trotta ea3e9fd68f feat(monthly): show asset accounts/currencies on specific sumaries 2026-08-15 01:30:57 -03:00
eitchtee 7947d5f874 chore(locale): update translation files
[skip ci] Automatically generated by Django makemessages workflow
2026-08-13 03:01:16 +00:00
Herculino Trotta 2ab6621205 Merge pull request #581 from obervinov/fix/recurring-tags-scheduler
fix: recurring tags and entities dropped when generated for another user
2026-08-13 00:00:48 -03:00
obervinov 11a6b3faa6 fix(transactions): recurring tags and entities dropped when generated for another user 2026-08-12 22:33:01 +04:00
GitEbu 72707f46e6 locale(German): update translation
Currently translated at 86.2% (670 of 777 strings)

Translation: WYGIWYH/App
Translate-URL: https://translations.herculino.com/projects/wygiwyh/app/de/
2026-08-10 12:57:27 +00:00
eitchtee 14011c2f60 chore(locale): update translation files
[skip ci] Automatically generated by Django makemessages workflow
2026-07-18 18:43:53 +00:00
Herculino Trotta a25adafe3b Merge pull request #568
feat(automatic-exchange-rates): Add Yahoo Finance as a provider via yfinance
2026-07-18 15:43:28 -03:00
Herculino Trotta 743951a862 feat(automatic-exchange-rates): Add Yahoo Finance as a provider via yfinance 2026-07-18 15:42:51 -03:00
eitchtee 0ec1c5c063 chore(locale): update translation files
[skip ci] Automatically generated by Django makemessages workflow
2026-07-18 00:29:20 +00:00
Herculino Trotta 5a80a3b1d3 feat: replace mp3 sounds with cuelume; deprecate volume setting 2026-07-17 21:28:13 -03:00
Juan David Afanador 8d8e87c9b8 locale(Spanish): update translation
Currently translated at 94.7% (736 of 777 strings)

Translation: WYGIWYH/App
Translate-URL: https://translations.herculino.com/projects/wygiwyh/app/es/
2026-07-10 04:57:19 +00:00
Herculino Trotta f59e53f6dc locale(Portuguese (Brazil)): update translation
Currently translated at 100.0% (777 of 777 strings)

Translation: WYGIWYH/App
Translate-URL: https://translations.herculino.com/projects/wygiwyh/app/pt_BR/
2026-07-05 23:34:35 +00:00
Dimitri Decrock 2b379987ac locale(Dutch): update translation
Currently translated at 100.0% (777 of 777 strings)

Translation: WYGIWYH/App
Translate-URL: https://translations.herculino.com/projects/wygiwyh/app/nl/
2026-07-05 15:57:19 +00:00
eitchtee 4b8ccf426d chore(locale): update translation files
[skip ci] Automatically generated by Django makemessages workflow
2026-07-04 15:39:07 +00:00
Herculino Trotta 4805ce9e04 Merge pull request #557 from obervinov/obervinov/app-owned-oauth-api-tokens
feat(api): add API tokens and OAuth2 client support for external integrations
2026-07-04 12:38:44 -03:00
obervinov 9e9e60ccec fix: copy the raw API token from the input value
The copy button passed the token through Django's escapejs filter into the
hyperscript writeText() call, which turns every "-" into -. hyperscript
does not decode \u escapes, so any token containing "-" (common with
token_urlsafe) was copied corrupted and failed auth on paste. Copy from the
input's value instead, which holds the unescaped raw token.
2026-06-30 01:02:54 +04:00
obervinovandClaude Opus 4.8 ca14f77f41 test: cover demo-mode block on revoked-token delete
Parity with the existing demo-mode tests for token create/revoke.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 00:00:10 +04:00
obervinovandClaude Opus 4.8 0fb37a59fa feat: add delete button for revoked API tokens
Revoked tokens previously stayed in the list with no way to remove them.
Adds a delete action (hard delete, scoped to the owner, gated behind
demo mode) shown on revoked rows, alongside the existing revoke action on
active ones.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 23:55:38 +04:00
sorcierwax e74d9177df locale(French): update translation
Currently translated at 100.0% (739 of 739 strings)

Translation: WYGIWYH/App
Translate-URL: https://translations.herculino.com/projects/wygiwyh/app/fr/
2026-06-27 21:57:19 +00:00
Herculino Trotta 106d721279 feat: add demo mode tests to ensure API is disabled on it 2026-06-27 18:02:31 -03:00
Herculino Trotta d0e9c05283 feat: disable oauth and token creation while on demo mode 2026-06-27 18:02:03 -03:00
sorcierwax 4e16831f4d locale(French): update translation
Currently translated at 97.1% (718 of 739 strings)

Translation: WYGIWYH/App
Translate-URL: https://translations.herculino.com/projects/wygiwyh/app/fr/
2026-06-27 20:57:19 +00:00
Herculino Trotta 7f5a91c11f fix: wrong Guam timezone string 2026-06-27 17:56:24 -03:00
Herculino Trotta 009a7038c8 style: improve api token box look 2026-06-27 17:56:05 -03:00
4273c541c5 Add API tokens and OAuth2 client support for external integrations
- Personal API tokens (model, user-settings UI, admin, management command,
  DRF auth class) for non-interactive API access from automations like n8n.
  Raw token shown once; only a SHA-256 hash is stored; last_used_at writes
  are throttled.
- OAuth2 authorization server via django-oauth-toolkit with authorization
  server metadata and optional, off-by-default Dynamic Client Registration
  (RFC 7591), so remote OAuth/MCP clients can authenticate and self-register.
- Tests for token auth, DCR gating and the management commands, plus
  .env.example and README documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 19:15:31 +04:00
Pawel Augustyn 7db0fcf097 locale(Polish): update translation
Currently translated at 73.8% (546 of 739 strings)

Translation: WYGIWYH/App
Translate-URL: https://translations.herculino.com/projects/wygiwyh/app/pl/
2026-06-08 07:57:18 +00:00
Pawel Augustyn 02896f21ed locale(Polish): update translation
Currently translated at 73.8% (546 of 739 strings)

Translation: WYGIWYH/App
Translate-URL: https://translations.herculino.com/projects/wygiwyh/app/pl/
2026-06-08 06:57:18 +00:00
Pawel Augustyn 5082c17d0f locale(Polish): update translation
Currently translated at 73.7% (545 of 739 strings)

Translation: WYGIWYH/App
Translate-URL: https://translations.herculino.com/projects/wygiwyh/app/pl/
2026-06-08 05:57:18 +00:00
Herculino Trotta fc99491f78 locale(Portuguese (Brazil)): update translation
Currently translated at 100.0% (739 of 739 strings)

Translation: WYGIWYH/App
Translate-URL: https://translations.herculino.com/projects/wygiwyh/app/pt_BR/
2026-06-07 14:57:19 +00:00
Dimitri Decrock cb0d379261 locale(Dutch): update translation
Currently translated at 100.0% (739 of 739 strings)

Translation: WYGIWYH/App
Translate-URL: https://translations.herculino.com/projects/wygiwyh/app/nl/
2026-06-07 08:57:18 +00:00
eitchtee 524e390a62 chore(locale): update translation files
[skip ci] Automatically generated by Django makemessages workflow
2026-06-06 08:15:55 +00:00