mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-03 17:55:03 +02:00
Properly escape user provided data in trans with data to prevent possible XSS attack vectors.
This commit is contained in:
parent
5b7f44f4ea
commit
6ff60e556e
3 changed files with 4 additions and 4 deletions
|
@ -1,12 +1,12 @@
|
|||
{% extends "main_card.html.twig" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans with {'%name%': part.name} %}part.edit.title{% endtrans %}
|
||||
{% trans with {'%name%': part.name|escape } %}part.edit.title{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block card_title %}
|
||||
<i class="fas fa-edit fa-fw" aria-hidden="true"></i>
|
||||
{% trans with {'%name%': part.name} %}part.edit.card_title{% endtrans %}
|
||||
{% trans with {'%name%': part.name|escape } %}part.edit.card_title{% endtrans %}
|
||||
<b><a href="{{ entity_url(part, 'info') }}" class="text-white">{{ part.name }}</a></b>
|
||||
<div class="float-end">
|
||||
{% trans %}id.label{% endtrans %}: {{ part.id }} {% if part.ipn is not empty %}(<i>{{ part.ipn }}</i>){% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue