Redact admin tokens and embed keys in error logs
CakePHP's error logger writes the request URL, the referer and exception messages (e.g. missing routes) to the log, which leaked the secret admin token and embed key into logs/error.log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8b0e82d806
commit
0678d72eda
4 files changed
+124
-1
No files matched your search
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\Error\RedactingErrorLogger;
|
||||
use Cake\Cache\Engine\FileEngine;
|
||||
use Cake\Database\Connection;
|
||||
use Cake\Database\Driver\Sqlite;
|
||||
@@ -234,6 +235,8 @@ return [
|
||||
'trace' => true,
|
||||
'ignoredDeprecationPaths' => [],
|
||||
'traceFormat' => null,
|
||||
// Masks admin tokens and embed keys in logged URLs and messages.
|
||||
'logger' => RedactingErrorLogger::class,
|
||||
],
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user