screentinker/server
ScreenTinker 6a0e5a28a9 Fix content file access gate for widget references
Extend the public /api/content/:id/file gate to unlock content referenced
by widgets (previously only playlists unlocked it), so device browsers
and kiosk iframes can fetch logos and background images that widgets
embed.

Security: scope the widget lookup to the content owner's widgets only
(w.user_id = content.user_id). Otherwise a user could unlock another
user's content file by creating their own widget whose config references
the victim's content UUID. The pre-existing playlist gate has the same
shape and is left for a separate fix.

Also adds a 30/min rate limit on POST /api/widgets/preview, which
inlines user content as base64 and is memory-intensive.

Perf note: the widgets.config LIKE scan is O(n). Fine at current scale;
revisit with a content_widget_refs join table if the widget table grows.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 22:28:55 -05:00
..
db Fix startup crash on existing DB: defer group_id index to migration 2026-04-16 07:59:49 -05:00
middleware Fix reset-admin.js: honor recovery token in requireAuth 2026-04-21 19:08:49 -05:00
player Add group-level scheduling, group playlist assignment, and persist audio unlock 2026-04-15 20:22:42 -05:00
routes Add directory board widget renderer with scrolling, anti-burn-in, dark/light themes 2026-04-21 22:28:37 -05:00
services Add group-level scheduling, group playlist assignment, and persist audio unlock 2026-04-15 20:22:42 -05:00
ws Fix broken service worker + device auth rejection on playlist refresh 2026-04-13 22:18:08 -05:00
config.js Initial open source release 2026-04-08 12:14:53 -05:00
package-lock.json Initial open source release 2026-04-08 12:14:53 -05:00
package.json Initial open source release 2026-04-08 12:14:53 -05:00
server.js Fix content file access gate for widget references 2026-04-21 22:28:55 -05:00