mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-11-05 04:02:56 -05:00
getZmuCommand() and the API's alarm action put the user's credentials on zmu's command line, where every local user can read them (ps, /proc/<pid>/cmdline): an auth hash with the default hashed relay, the plaintext password with ZM_AUTH_RELAY=plain. The API also wrote the whole command to the debug log. With the default ZM_AUTH_HASH_IPS=0 that hash is accepted as an auth= login from any address for ZM_AUTH_HASH_TTL hours. zmuCredentials() builds them in one place: with a usable ZM_AUTH_HASH_SECRET, an access token for the user that expires after a minute (zmu -T, accepted with every relay). Without the secret zmu refuses tokens, so it gets what it did before. The API logs the command without the credentials. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 32bc2b3fee87b752590ba6f210403afd9222d9ff)
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