Commit Graph
19 Commits
Author SHA1 Message Date
Jash b7b26a26c0 fix: frames list no longer divides by a missing monitor's width refs #6711 2026-11-18 19:07:00 +05:30
singhharsh1708 35b9083d9b fix: list requests no longer fail when search, sort or order is an array 2026-11-18 00:18:16 +05:30
singhharsh1708 18d7d5fe39 fix: frames list answers a malformed advanced search instead of failing 2026-11-16 04:35:37 +05:30
Isaac Connor d805562f65 Merge pull request #5596 from AJ0070/5594-frames-sql-paging
perf: page the frames list in SQL instead of fetching every frame of the event
2026-11-15 11:18:36 -05:00
Jash a446dbad78 fix: pass the frames list thumbnail height to the image view without quotes refs #5850 2026-11-14 19:09:33 +05:30
Jash 6aba0808e9 fix: leave out the search clause in the frames list when the search terms give no SQL refs #5594 2026-11-12 06:02:26 +05:30
Jash ace70a4fb1 perf: page the frames list in SQL instead of fetching every frame of the event fixes #5594 2026-11-12 05:42:34 +05:30
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
Isaac ConnorandClaude Opus 5.5 b79239940f fix: scope the frames list search to its event and match on FrameId refs #5164
ajax/frames.php collected Frames.Id values from the event's rows and then
filtered with a FrameId IN (...) term, which FilterTerm translated to
Id IN (...). The search query had no EventId condition of its own. Once
the term matches on FrameId, which is only unique within an event, it
returns rows from every event, so the query is now anchored on the event
with the same WHERE EventId clause as the unfiltered list.

FilterTerm now maps FrameId to the FrameId column. The frames list
thumbnail links address the image by eid and fid instead of Frames.Id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 11:48:26 -04:00
Isaac Connor 969baa3891 Convert user from an array to a User object 2023-04-23 12:57:29 -04:00
Isaac Connor 44c7582003 Don't shorten analysis 2023-02-20 17:30:48 -05:00
Isaac Connor 753ba9e22b Fix no results when showing all frames due to undefined limit 2022-12-04 10:44:03 -05:00
Isaac Connor 6325dc6d1c Use dateTimeFOrmatter to format the date/time on frames 2022-06-01 15:43:15 -04:00
Andrew Bauer 2f0df74c54 show the analyse image in frames view if it exists 2020-12-12 11:37:50 -06:00
Andrew Bauer a2b5271835 fix copy/paste typo 2020-11-14 17:34:59 -06:00
Andrew Bauer 0ffb5e153c modify FilterTerm to support Frames view searches 2020-11-14 17:33:18 -06:00
Andrew Bauer f3756def08 deploy server side pagination for frames view 2020-11-14 14:45:22 -06:00
Andrew Bauer 9aa6fea6a3 frames view server pagination WIP 2020-11-14 14:19:28 -06:00
Andrew Bauer 52e747791d rough in frames server pagination backend 2020-11-13 12:34:01 -06:00