Commit Graph
1 Commits
Author SHA1 Message Date
Isaac ConnorandClaude Opus 4.8 28c5f267a7 fix: require per-event view permission to list an event's frames refs GHSA-8fj6-vrj2-vxmr
ajax/frames.php task=query checked the global canView('Events') and then
built the Frames query from the request event id alone, without the
per-event check its siblings make. A user with Events=View but a monitor
permission of None on an event's monitor could read that event's frame
records -- frame number, Normal/Alarm type, timestamp, delta and score --
for any event on a denied monitor, learning when activity happened and how
strong the alarm scores were across monitor boundaries. This is the web
copy of the disclosure GHSA-mg2g-jmfc-3w8g fixed in the Frames API;
frame images stay protected by views/image.php.

Construct the event in the sanity block and refuse the request unless
ZM\Event::canView() passes, which enforces the per-monitor permission
through Monitor()->canView(), matching ajax/event.php and the API.

Test tests/php/test_frames_query_requires_view.php includes the real file
with the web helpers stubbed (one child php process per case, as the file
declares queryRequest() at file scope) and asserts the Frames table is
never read for a denied or missing event. 11 checks; 6 fail before the fix.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-02 08:39:59 -05:00