fix(system): only pass http(s) release URLs to clients #26

Merged
nalum merged 1 commit from fix/release-url-scheme into main 2026-08-13 11:38:08 +00:00
Owner

CheckForUpdate copied the feed's html_url into ReleaseUrl unvalidated, and the admin page renders it into an anchor href — a compromised feed could serve a javascript: URL.

safeReleaseURL now admits only absolute http/https URLs with a host; anything else becomes empty. Table-driven tests cover javascript:, data:, case tricks, scheme-relative, relative, empty, and unparsable inputs.

Fixes #19

🤖 Generated with Claude Code

`CheckForUpdate` copied the feed's `html_url` into `ReleaseUrl` unvalidated, and the admin page renders it into an anchor href — a compromised feed could serve a `javascript:` URL. `safeReleaseURL` now admits only absolute http/https URLs with a host; anything else becomes empty. Table-driven tests cover `javascript:`, `data:`, case tricks, scheme-relative, relative, empty, and unparsable inputs. Fixes #19 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(system): only pass http(s) release URLs to clients
All checks were successful
check / web (push) Successful in 1m30s
check / go (push) Successful in 1m45s
be11cab969
The update feed's html_url was copied into ReleaseUrl unvalidated,
and the admin web page renders that value into an anchor href — a
compromised or substituted feed could serve javascript: (or data:)
and get script execution in the admin's session. A server-side
scheme allowlist (absolute http/https only, host required) closes
that off; anything else leaves ReleaseUrl empty, since a missing
link beats a hostile one.

Fixes #19
nalum force-pushed fix/release-url-scheme from be11cab969
All checks were successful
check / web (push) Successful in 1m30s
check / go (push) Successful in 1m45s
to c8ead552ad
Some checks failed
tag / tag (push) Has been cancelled
check / web (push) Successful in 1m40s
check / go (push) Successful in 2m3s
2026-08-13 11:33:33 +00:00
Compare
nalum scheduled this pull request to auto merge when all checks succeed 2026-08-13 11:33:57 +00:00
nalum merged commit c8ead552ad into main 2026-08-13 11:38:08 +00:00
nalum deleted branch fix/release-url-scheme 2026-08-13 11:38:08 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
eagraiclainne/app!26
No description provided.