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:
Frank
2026-08-10 21:41:53 +02:00
co-authored by Claude Sonnet 5
parent 2913b8d2a2
commit ba45e06972
+1 -1
View File
@@ -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 %}