libra/static
Padreug cd5a6edb7d feat(accounts): validate account-name characters server-side
The endpoint only checked the root prefix, so a direct API call (bypassing
the UI) could write a malformed Open directive into the ledger source.
Add _validate_account_name mirroring Beancount's core/account.py grammar
(root [\p{Lu}][\p{L}\p{Nd}-]*, sub [\p{Lu}\p{Nd}][\p{L}\p{Nd}-]*, >=1
sub-account) — verified to match beancount.core.account.is_valid across
20 cases incl. Unicode, digit-start subs, hyphens. Align the client
segment regex to the same rule (was ASCII-only, rejected valid names).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 22:55:45 +02:00
..
image Rename Castle Accounting extension to Libra 2026-05-05 10:24:46 +02:00
js feat(accounts): validate account-name characters server-side 2026-06-16 22:55:45 +02:00