- New SecurityHeadersMiddleware (outermost): CSP with a per-request script nonce, framing (SAMEORIGIN, embeds via frame-ancestors), nosniff, Referrer- and Permissions-Policy. JSON, files and error pages are covered now, not only rendered HTML; headers set by controllers still win. - The inline theme script carries the nonce; flash messages are dismissed via data-dismiss instead of inline onclick handlers, and the flash elements share one template. - reCAPTCHA sources are only allowed when it is enabled. - The embed CSRF exception and framing use the same isEmbed() check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 lines
220 B
PHP
11 lines
220 B
PHP
<?php
|
|
/**
|
|
* @var \App\View\AppView $this
|
|
* @var array $params
|
|
* @var string $message
|
|
*/
|
|
echo $this->element('flash/default', [
|
|
'message' => $message,
|
|
'params' => ['class' => 'success'] + ($params ?? []),
|
|
]);
|