mirror of
https://github.com/coollabsio/coolify.git
synced 2026-06-14 03:19:51 +00:00
fix: sanitize error output in server validation logs
Escape dynamic error messages with htmlspecialchars() before concatenating into HTML strings stored in validation_logs. Add a Purify-based mutator on Server model as defense-in-depth, with a dedicated HTMLPurifier config that allows only safe structural tags. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -49,6 +49,17 @@ return [
|
||||
'AutoFormat.RemoveEmpty' => false,
|
||||
],
|
||||
|
||||
'validation_logs' => [
|
||||
'Core.Encoding' => 'utf-8',
|
||||
'HTML.Doctype' => 'HTML 4.01 Transitional',
|
||||
'HTML.Allowed' => 'a[href|title|target|class],br,div[class],pre[class],span[class],p[class]',
|
||||
'HTML.ForbiddenElements' => '',
|
||||
'CSS.AllowedProperties' => '',
|
||||
'AutoFormat.AutoParagraph' => false,
|
||||
'AutoFormat.RemoveEmpty' => false,
|
||||
'Attr.AllowedFrameTargets' => ['_blank'],
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user