mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-08-03 00:37:21 -04:00
The config-api RCE fix (b036408a5) guards edit() and delete() with ($user['System'] == 'Edit'), but $user is a ZM\User object that does not implement ArrayAccess and whose System property is protected. Array access on it raises "Error: Cannot use object of type ZM\User as array", so the endpoint fatals with HTTP 500 for every authenticated user. This blocks the RCE only by accident and also breaks config editing for legitimate System=Edit admins. Use $user->System(), matching the idiom in every other API controller (States, Servers, Monitors, Users, etc.). Refs GHSA-mvj8-mqqq-2w5f. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit2f57a4f606)
4.8 KiB
4.8 KiB