registry/internal
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Radoslav Dimitrov fbfd63ced8
fix(ui): encode publisher-controlled URLs for href attribute context (#1248)
The catalogue page interpolates publisher-supplied URL fields
(`server.repository.url`, `server.websiteUrl`) inside `href="..."`
attributes via `innerHTML`, escaping them with a
`textContent`→`innerHTML`
helper. Per the HTML5 fragment-serialisation algorithm, that round-trip
encodes only `&`, `<`, `>`, and U+00A0 inside text nodes — it does not
encode `"` or `'`. The helper is therefore safe in element-text
contexts (where it is used for `name`, `version`, `description`, etc.)
but unsafe inside an attribute value.

Add an attribute-safe `escapeAttr` helper that follows the OWASP
attribute-encoding rule (also encodes `"` and `'`) and use it for the
two `href` interpolations. Element-text usages keep the existing
`escapeHtml` and remain unchanged. A short comment on each helper
documents the contexts they cover so future fields are wired up
correctly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 09:25:41 -04:00
..
api fix(ui): encode publisher-controlled URLs for href attribute context (#1248) 2026-05-04 09:25:41 -04:00
auth security: fix open redirect and add small hardening (#1227) 2026-04-29 19:14:00 -04:00
config auth: bind GitHub OIDC token exchange to a per-deployment audience (#1229) 2026-04-29 20:27:26 -04:00
database refactor: extract readBody helper to remove duplicate io.ReadAll calls (#1241) 2026-05-04 06:57:02 -04:00
importer Enhanced server.json validation (phase 1) (#636) 2026-01-16 00:49:39 +02:00
service fix(list): use row-constructor cursor + restore per-phase publish timings + enable pg_stat_statements (#1215) 2026-04-27 15:35:59 -04:00
telemetry build(deps): bump go.opentelemetry.io/contrib/instrumentation/runtime from 0.64.0 to 0.65.0 (#940) 2026-02-09 11:11:06 +02:00
validators security: fix open redirect and add small hardening (#1227) 2026-04-29 19:14:00 -04:00