mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-11-30 04:04:03 -05:00
Changing a user's password rewrote only the password hash and left the user's JWT API tokens valid: a pre-change access token kept working and a pre-change refresh token kept minting new access tokens for up to its 24 hour lifetime, so a leaked token survived the password change meant to cut it off. Set TokenMinExpiry to the change time in the same step that rewrites the hash, so validateToken() rejects every token issued before the change, matching the options page's existing revoke action. Covered paths: the REST API User model (beforeSave), with the self-edit controller whitelist widened to persist the field, and the classic web UI user action for both the administrator edit and the self edit. The login-time upgrade of a legacy hash to bcrypt rewrites the same password and is left untouched so it does not revoke tokens. refs GHSA-5w6w-qp25-2qqh Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ZoneMinder API
This is the ZoneMinder API. It should be, for now, installed under the webroot e.g. /api.
app/Config/database.php.default must be configured and copied to app/Config/database.php
In addition, Security.salt and Security.cipherSeed in app/Config/core.php should be changed.
The API can run on a dedicated / separate instance, so long as it can access the database as configured in app/Config/database.php