Redact admin tokens and embed keys in error logs
CI / Deploy / test (push) Successful in 54s
CI / Deploy / deploy (push) Skipped

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:
gnilebeinandClaude Opus 5.5 committed 2026-11-08 21:53:30 +01:00
1 parent 8b0e82d806
commit 0678d72eda
4 files changed
+124 -1

No files matched your search

+3
View File
@@ -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,
],
/*