screentinker/frontend/js/views
ScreenTinker fe36c8c4b9 security(widgets): add sandbox="allow-scripts" to widget iframes
Addresses the primary finding from the May 27 security report (issue #8):
the admin widget preview modal (frontend/js/views/widgets.js) and the web
player widget renderer (server/player/index.html, 2 sites) loaded
user-authored widget HTML into unsandboxed iframes. Same-origin scripts
in the widget content could access window.parent.localStorage and
exfiltrate the JWT.

sandbox="allow-scripts" without allow-same-origin sandboxes the widget
into a unique origin: inline scripts (clock, RSS, weather widgets)
continue to work, but parent-origin access and same-origin requests are
blocked. Verified via Playwright probe against all 6 widget types in the
dev DB (clock, rss, social, text, weather, webpage): each renders
correctly under the new sandbox and contentDocument access from the
parent is blocked (opaque-origin enforcement working). Admin preview
unchanged in appearance; player display unchanged.

Webpage widget (server/routes/widgets.js) sandbox tightening (drop
allow-same-origin) is a separate forthcoming commit - needs test against
real embed URLs since some sites rely on same-origin behavior. The
sandbox-attribute intersection rule means today's outer-iframe sandbox
will cascade and strip allow-same-origin from the webpage widget's inner
iframe too; accepted as a narrow cosmetic regression (cookies/localStorage
stripped for embedded sites) until the deliberate inner-iframe handling
ships.

SECURITY.md added with reporting process (GitHub Security Advisories
primary, support@bytetinker.net fallback) and scope.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 12:28:34 -05:00
..
activity.js i18n batch 6: wire teams + activity + help (~62 keys) 2026-04-29 20:16:21 -05:00
admin-player-debug.js Add player debug overlay and server-side error telemetry sink 2026-05-15 15:20:42 -05:00
admin.js Phase 2.1: tenancy middleware, permission helpers, JWT workspace context, frontend + backend role-rename compat 2026-05-11 20:02:00 -05:00
billing.js i18n batch 5: wire layout-editor + video-wall + billing (~85 keys) 2026-04-29 20:13:38 -05:00
content-library.js i18n: extract all strings, add 6 language translations, restructure i18n module 2026-04-29 19:25:22 -05:00
dashboard.js fix(dashboard): selection bar surfaces 'pick 1 more' hint when 1 display selected so the disabled Create Video Wall button isn't silently unresponsive 2026-05-11 22:56:15 -05:00
designer.js i18n batch 2b: wire designer.js (~80 keys) 2026-04-29 19:57:12 -05:00
device-detail.js fix(zones): frontend assignment-flow picker + missed devices.js zone_id projection 2026-05-14 21:26:58 -05:00
help.js i18n batch 6: wire teams + activity + help (~62 keys) 2026-04-29 20:16:21 -05:00
kiosk.js i18n batch 4: wire schedule + reports + kiosk (~95 keys) 2026-04-29 20:09:32 -05:00
layout-editor.js i18n batch 5: wire layout-editor + video-wall + billing (~85 keys) 2026-04-29 20:13:38 -05:00
login.js i18n: extract all strings, add 6 language translations, restructure i18n module 2026-04-29 19:25:22 -05:00
onboarding.js i18n batch 3b: wire onboarding.js + admin.js (~84 keys) 2026-04-29 20:04:23 -05:00
playlists.js fix(frontend): playlists.js thumbnail path uses API endpoint instead of legacy direct path 2026-05-12 11:44:30 -05:00
reports.js i18n batch 4: wire schedule + reports + kiosk (~95 keys) 2026-04-29 20:09:32 -05:00
schedule.js fix(schedule): add delete button to schedule edit modal so schedules can be removed from the UI (DELETE /api/schedules/:id already existed) 2026-05-11 23:05:03 -05:00
settings.js feat(email): Microsoft Graph send + alert spam protection + preferences UI 2026-05-12 18:16:40 -05:00
teams.js i18n batch 6: wire teams + activity + help (~62 keys) 2026-04-29 20:16:21 -05:00
video-wall.js Video walls: free-form canvas editor, leader-driven sync, group dissolve, progress bars 2026-04-29 23:11:16 -05:00
widgets.js security(widgets): add sandbox="allow-scripts" to widget iframes 2026-05-28 12:28:34 -05:00
workspace-members.js feat(workspaces): mutation UI for members (slice 2B) 2026-05-17 14:45:34 -05:00