Commit Graph
2 Commits
Author SHA1 Message Date
Nic BoetandClaude Opus 5.5 f681c23825 fix: log a fingerprint of the auth hash in getAuthUser()
getAuthUser() logged the presented auth hash at debug level on every
check and at Info level whenever a check failed. Info reaches the Logs
table at the default database log level, which System=View users read.
A hash refused here can still be valid: bound to another client address
(ZM_AUTH_HASH_IPS) or meant for another server. Log its fingerprint,
the same tag zms and zm_rtsp_server log for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 10:27:39 -05:00
Nic BoetandClaude Opus 5.5 06b7a43b2b fix: stop logging the encoded password and bcrypt hash at login
For a user whose hash zmupdate.pl overlaid with bcrypt ("-ZM-" prefix),
validateUser() logged the MySQL-encoded form of the typed password next
to the stored bcrypt hash at debug level, on every login attempt, right
or wrong. The MySQL-encoded form is SHA1(SHA1(password)), unsalted, so
it falls to an offline dictionary attack. The line above it already
says which comparison runs.

Adds tests/php/test_auth_log_redaction.php, which records every log line
validateUser() writes for each stored hash type and searches them for
the password, its encoded form and the stored hash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 10:27:22 -05:00