mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
[SECURITY] Fix XSS vulnerability in Lightbox caption
This commit is contained in:
@@ -170,7 +170,8 @@
|
|||||||
<div class="col-md-8 col-xs-12">
|
<div class="col-md-8 col-xs-12">
|
||||||
{% if item.picture %}
|
{% if item.picture %}
|
||||||
<a href="{{ item.picture.url }}" class="productpicture"
|
<a href="{{ item.picture.url }}" class="productpicture"
|
||||||
data-title="{{ item.name }}"
|
data-title="{{ item.name|force_escape|force_escape }}"
|
||||||
|
{# Yes, double-escape to prevent XSS in lightbox #}
|
||||||
data-lightbox="{{ item.id }}">
|
data-lightbox="{{ item.id }}">
|
||||||
<img src="{{ item.picture|thumbnail_url:'productlist' }}"
|
<img src="{{ item.picture|thumbnail_url:'productlist' }}"
|
||||||
alt="{{ item.name }}"/>
|
alt="{{ item.name }}"/>
|
||||||
@@ -281,7 +282,8 @@
|
|||||||
<div class="col-md-8 col-xs-12">
|
<div class="col-md-8 col-xs-12">
|
||||||
{% if item.picture %}
|
{% if item.picture %}
|
||||||
<a href="{{ item.picture.url }}" class="productpicture"
|
<a href="{{ item.picture.url }}" class="productpicture"
|
||||||
data-title="{{ item.name }}"
|
data-title="{{ item.name|force_escape|force_escape }}"
|
||||||
|
{# Yes, double-escape to prevent XSS in lightbox #}
|
||||||
data-lightbox="{{ item.id }}">
|
data-lightbox="{{ item.id }}">
|
||||||
<img src="{{ item.picture|thumbnail_url:'productlist' }}"
|
<img src="{{ item.picture|thumbnail_url:'productlist' }}"
|
||||||
alt="{{ item.name }}"/>
|
alt="{{ item.name }}"/>
|
||||||
|
|||||||
@@ -38,7 +38,8 @@
|
|||||||
<div class="col-md-8 col-xs-12">
|
<div class="col-md-8 col-xs-12">
|
||||||
{% if item.picture %}
|
{% if item.picture %}
|
||||||
<a href="{{ item.picture.url }}" class="productpicture"
|
<a href="{{ item.picture.url }}" class="productpicture"
|
||||||
data-title="{{ item.name }}"
|
data-title="{{ item.name|force_escape|force_escape }}"
|
||||||
|
{# Yes, double-escape to prevent XSS in lightbox #}
|
||||||
data-lightbox="{{ item.id }}">
|
data-lightbox="{{ item.id }}">
|
||||||
<img src="{{ item.picture|thumbnail_url:'productlist' }}"
|
<img src="{{ item.picture|thumbnail_url:'productlist' }}"
|
||||||
alt="{{ item.name }}"/>
|
alt="{{ item.name }}"/>
|
||||||
@@ -125,7 +126,8 @@
|
|||||||
<div class="col-md-8 col-xs-12">
|
<div class="col-md-8 col-xs-12">
|
||||||
{% if item.picture %}
|
{% if item.picture %}
|
||||||
<a href="{{ item.picture.url }}" class="productpicture"
|
<a href="{{ item.picture.url }}" class="productpicture"
|
||||||
data-title="{{ item.name }}"
|
data-title="{{ item.name|force_escape|force_escape }}"
|
||||||
|
{# Yes, double-escape to prevent XSS in lightbox #}
|
||||||
data-lightbox="{{ item.id }}">
|
data-lightbox="{{ item.id }}">
|
||||||
<img src="{{ item.picture|thumbnail_url:'productlist' }}"
|
<img src="{{ item.picture|thumbnail_url:'productlist' }}"
|
||||||
alt="{{ item.name }}"/>
|
alt="{{ item.name }}"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user