Skip to content

fix(web): only http(s) asset URLs become service hrefs - #341

Merged
BaaRai merged 1 commit into
BaaRai:mainfrom
Coff0xc:fix/asset-http-href
Nov 18, 2026
Merged

BaaRai merged 1 commit into
BaaRai:mainfrom
Coff0xc:fix/asset-http-href

Conversation

@Coff0xc

@Coff0xc Coff0xc commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

The Services tab used the stored asset url as href whenever service_type was http. UpsertHTTPService does not require an http/https scheme, so a javascript: or data: value from insert_assets, the asset API, or ScopeSentry sync became an anchor.

httpHref now allows only http: and https:. Other values still display as text.

Tested: node --test web/src/lib/http-href.test.mjs pass. The assets page was not exercised in a browser here (no local web install).

Copilot AI balanced review requested due to automatic review settings November 18, 2026 17:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@BaaRai BaaRai left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed: httpHref accepts only http and https, and the Services tab falls back to text. The new Node test is not wired into CI and does not run on a Node built without TypeScript support, so the proof here is the code itself. CI green.

The Services tab wrote the stored asset URL into href with no scheme
check. A javascript: or data: value stored via insert_assets or the
asset API became a clickable link. Non-http(s) URLs now render as text.
@BaaRai
BaaRai force-pushed the fix/asset-http-href branch from a8af186 to d1431cf Compare November 18, 2026 21:39
@BaaRai
BaaRai merged commit 48d6158 into BaaRai:main Nov 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants