item with key 'no_referer3' has text:
'If you are using the <meta name="referrer" content=\"no-referrer\"> tag
or including the “Referrer-Policy: no-referrer” header, please remove
them. The CSRF protection requires the “Referer” header to do strict
referer checking. If you’re concerned about privacy, use alternatives like
<a rel=\"noreferrer\" …> for links to third-party sites.'
If i put this message simply in <html><head><title> {{ c.no_referer3 }}
</title>, it break browser work.
The browsers takes <meta name="referrer" content=\"no-referrer\"> as
normal meta. (chrome and Firefox)
This text "from box" has not escaped symbols and therefore it is
dangerous. Of course, I can change it with translations.
--
Ticket URL: <https://code.djangoproject.com/ticket/33523>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => invalid
Comment:
Thanks for this report, however I cannot imagine how that could be
dangerous 🤔. As far as I understand correctly, you have a custom template
for CSRF failure and you put `no_referer3` in the `<head>` HTML tag, even
so it's not marked as safe and will not be interpreted by a browser.
--
Ticket URL: <https://code.djangoproject.com/ticket/33523#comment:1>