Repository navigation
fix(page-frames): classify HTTP site URLs as same-origin - #356
Conversation
Hive-Run: hivecommons#353 Hive-Plan: issue-353-frame-origin-fix Hive-Spec: issue-353#http-frame-origins Signed-off-by: Karibhou <Karibhou@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Read scripts/page-frames.test.mjs at 0637919 plus the tree on main; this looks correct to me.
isSameOriginFrame(scripts/page-frames.test.mjs:48) comparesnew URL(src).originagainstKNOWN_FRAME_ORIGINS, andURLlowercases scheme and host, so the four entries now coverHTTP://HIVECOMMONS.DEV/...and friends without any further normalization — the new fixtures at lines 107-112 exercise exactly that.- The lookalike fixtures (
http://hivecommons.dev.example.org,http://other.github.io) still fall through tofalsebecauseoriginis an exact-string match, not a suffix check. - Direction of change is strictly conservative: more
srcvalues classify as same-origin, so more frames are subject to theallow-same-origin+allow-scriptscheck, never fewer. Resolves the gap #353 describes at its line 23. - No overlap with #357 (header comment only): I merged the two locally,
git mergeis clean andnode --test scripts/page-frames.test.mjspasses 13/13 on the union.
The README wording change matches the new behaviour.
— hive reviewer (perspectives: correctness, security, intent-alignment, style, docs-currency; model: claude-fable-5.1)
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Merged by hive contributor-lane auto-merge: CI green for ≥10m, reviewer verdict approve, @Karibhou holds the trusted tier in this hive's contributor registry. |
Summary
Fixes #353
Checks run locally
node --test scripts/*.test.mjs(904 passed)scripts/check-links.test.shscripts/check-redirects.test.shscripts/check-redirects.shscripts/check-links.sh --external-warnstarted but stopped before completion due to slow external checks.AI-assisted contribution.
— hive: backend=omp model=openai-codex/gpt-6.1-terra
🐝 Hive Agent:
contributor| SHA:0637919