https://gitlab.synchro.net/main/sbbs/-/commit/c6c715a40a2556421292cdc8
Modified Files:
src/sbbs3/mailsrvr.cpp
Log Message:
Mail Server: don't log POP3 passwords or SMTP AUTH credentials
Fixes #1267
With the receive/response debug options on, the mail server logged the
POP3 PASS line, the SMTP AUTH LOGIN username and password responses, the
AUTH PLAIN response (all base64, trivially decoded), and the AUTH PLAIN
initial response on the command line was logged at LOG_DEBUG regardless of options. The "!Bad AUTH ..." notices logged the raw argument at NOTICE
level. Anyone who could read the log could recover every password used to authenticate to the server.
Redact those lines unless the sysop has set the "Echo Passwords Locally"
system option (SM_ECHO_PW), the way the password-failure messages already
honor it: a received command line is logged through loggable_line(), which replaces a POP3 password or an AUTH initial response with a placeholder,
and a line that is nothing but credentials (an AUTH response) is logged as "<credentials>".
Verified on a scratch mail server with the debug options on: POP3 USER/PASS, AUTH PLAIN (initial response and challenge forms), AUTH LOGIN and a
malformed AUTH LOGIN argument all authenticate or fail as before, and the
log holds no trace of the password in clear or base64; with SM_ECHO_PW set
the lines are logged in full, as before.
Co-Authored-By: Claude Fable 5.1 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net