agnes-the-ai-analyst/app
Vojtech Rysanek 58001af27d fix(web): address PR #372 review — meta charset ordering + enabled coercion
Two issues raised by @minasarustamyan:

1. head_start loop rendered BEFORE <meta charset="UTF-8"> in both
   base.html and base_login.html. HTML5 requires the charset declaration
   within the first 1024 bytes; a long operator-injected snippet could
   push it past that window, dropping browsers into locale-default
   encoding (historically a UTF-7 charset-confusion XSS vector). Move
   the head_start loop after charset + viewport meta tags — vendor
   hooks (GTM dataLayer init, etc.) still install before any CSS/JS, the
   two required meta tags just come first.

2. `entry.get("enabled") is False` matched only the Python False
   singleton — `enabled: "false"` (quoted YAML string), `enabled: 0`,
   `enabled: "no"` etc. all slipped through (bool("false") == True in
   Python). For what is meant to be a kill switch on admin-injected JS,
   an operator who fat-fingers the quoting would silently leave the
   snippet live. Add `_custom_script_enabled()` coercion helper that
   honours quoted booleans, numeric 0, and the usual `no`/`off`/`""`
   variants. Default-on for missing / None to preserve the
   default-enabled field semantics.

13 new parametrized tests cover every YAML truthy-shape the operator
might paste. Render test now asserts head_start lands after both
required <meta> tags.
2026-05-21 13:59:11 +04:00
..
api feat(web): instance.custom_scripts — operator-injected HTML/JS into base.html 2026-05-21 13:22:27 +04:00
auth Activity Center: audit log + telemetry + sessions + agnes_* tables (#278) 2026-05-12 22:41:19 +02:00
debug feat(observability): request_id end-to-end + dev debug toolbar + centralized logging (#136) 2026-04-29 22:54:21 +02:00
marketplace_server Marketplace UX overhaul: rich plugin/skill/agent detail + filename rename (#251) 2026-05-12 08:38:39 +00:00
middleware feat(observability): optional PostHog integration (#231) 2026-05-08 17:57:10 +04:00
services feat(stack): unified Browse + My Stack for Data Packages and Memory (v49 schema) (#333) 2026-05-19 15:00:15 +02:00
web fix(web): address PR #372 review — meta charset ordering + enabled coercion 2026-05-21 13:59:11 +04:00
__init__.py feat: add FastAPI server with auth, RBAC, and all API endpoints 2026-03-27 15:19:18 +01:00
instance_config.py fix(web): address PR #372 review — meta charset ordering + enabled coercion 2026-05-21 13:59:11 +04:00
logging_config.py feat(observability): request_id end-to-end + dev debug toolbar + centralized logging (#136) 2026-04-29 22:54:21 +02:00
main.py feat(stack): unified Browse + My Stack for Data Packages and Memory (v49 schema) (#333) 2026-05-19 15:00:15 +02:00
markdown_render.py Marketplace UX overhaul: rich plugin/skill/agent detail + filename rename (#251) 2026-05-12 08:38:39 +00:00
resource_types.py feat(stack): unified Browse + My Stack for Data Packages and Memory (v49 schema) (#333) 2026-05-19 15:00:15 +02:00
secrets.py feat(initial-workspace): per-instance agnes init override (#292) 2026-05-13 20:35:01 +00:00
utils.py feat(initial-workspace): per-instance agnes init override (#292) 2026-05-13 20:35:01 +00:00
version.py docs(version): clarify APP_VERSION scope + middleware /api prefix rationale 2026-05-06 23:23:23 +02:00