The previous commit stopped zmLoadAuthUser() logging the presented auth
hash, which also took away the only way to tell which hash a failed
attempt carried. Log "fp:" plus the first 8 hex digits of the hash's
SHA-256 instead: enough to match a zms or zm_rtsp_server line with the
web side's (ZM\logFingerprint() gives the same tag) or with a client's
own copy, and of no use for replaying or recovering the hash.
Adds SHA-256 to zm::crypto for both the OpenSSL and the GnuTLS backend.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zmLoadAuthUser() logged, at debug level 1, the auth_key it builds for each
candidate user and hour. That string starts with ZM_AUTH_HASH_SECRET, the
key that also signs JWT access tokens, followed by the username and the
stored password hash. User::getAuthHash() logged the same string, and the
presented ?auth= hash was logged as well. verifyPassword() logged the stored
and computed MySQL-style SHA1 password hashes.
Any daemon that checks an ?auth= hash (zms, zm_rtsp_server) with debug
enabled wrote these to its log file, and to the Logs table when database
logging is at Debug.
Log the username being checked instead, and drop the hash values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With this commit a unified structure for includes is introduced.
The general rules:
* Only include what you need
* Include wherever possible in the cpp and forward-declare in the header
The includes are sorted in a local to global fashion. This means for the include order:
0. If cpp file: The corresponding h file and an empty line
1. Includes from the project sorted alphabetically
2. System/library includes sorted alphabetically
3. Conditional includes