Remove |raw from login error message rendering
Not exploitable today - the only custom auth message data is a hardcoded resend link - but |raw on a translated exception message is a latent XSS pattern if a future change ever threads user input through the auth exception's message data. Twig's default autoescaping is sufficient here. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
<form method="post">
|
<form method="post">
|
||||||
{% if error %}
|
{% if error %}
|
||||||
<div class="alert alert-danger">
|
<div class="alert alert-danger">
|
||||||
{{ error.messageKey|trans(error.messageData, 'security')|raw }}
|
{{ error.messageKey|trans(error.messageData, 'security') }}
|
||||||
{% if error.messageData['%resend_link%'] is defined %}
|
{% if error.messageData['%resend_link%'] is defined %}
|
||||||
<a href="{{ error.messageData['%resend_link%'] }}">Resend activation link</a>
|
<a href="{{ error.messageData['%resend_link%'] }}">Resend activation link</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user