Commit Graph
6 Commits
Author SHA1 Message Date
Isaac ConnorandClaude Opus 4.8 516bab0247 fix: enforce per-monitor ACL on direct event, frame and zone API endpoints
Several API endpoints checked only the coarse Events/Monitors permission
and not the per-monitor object ACL, so a user explicitly denied a monitor
could still reach that monitor's objects by addressing them directly:

- EventsController::edit() and ::delete() checked Events=Edit but never
  called canEdit() on the event, so any event could be mutated or deleted
  by Id.
- FramesController only guaranteed Events != None in beforeFilter().
  view() returned any frame by Id, and edit()/delete() mutated frames
  without requiring Events=Edit or checking the parent event at all.
- ZonesController::forMonitor() listed zones for any monitor Id.

Resolve the owning object and apply the same canView()/canEdit() checks
the normal read paths already use. Frames are addressed by their own Id,
so their parent event is looked up to reach the monitor ACL.

Refs GHSA-hw39-qpjw-p7cg.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 11:51:54 -04:00
Isaac Connor 6e8347c693 Use viewableMonitorIds instead of deprecated MonitorIds 2023-05-12 08:59:36 -04:00
stefan 1bd9def63e [API] Fix User variable from array to object
Fix $user variable from array to object to make API work again.
2023-04-23 22:07:24 +02:00
Isaac Connor 662aa9f39d Add getting frames by event id or other named filters to api 2023-01-09 16:53:27 -05:00
Isaac Connor 8a5e9d944d Add authentication to FramesController 2022-10-27 16:59:34 -04:00
Kyle Johnson f1f3de6d7d Moved the api to underneath the web directory 2014-04-29 20:41:04 +00:00