PHP-042 / Intermediate
Logging passwords, tokens or personal data and log injection
Why is this a problem?
Secrets remain in log files, and newline insertion enables forged logs.
How to fix it
php
Log::info('login', ['email' => $request->email, 'ip' => $request->ip()]);
// Remove control characters: str_replace(["\r", "\n"], ' ', $value)