From c20d9e311f5faa815d35a87a6cfc50644c81244b Mon Sep 17 00:00:00 2001 From: Alexey Py Date: Wed, 4 Jan 2017 23:57:33 +0300 Subject: [PATCH 1/4] Update copyright year --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c94882884..f96e2b8c7 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,6 @@ make run ``` # License -Copyright © 2013-2016 Nicolas Lœuillet +Copyright © 2013-2017 Nicolas Lœuillet This work is free. You can redistribute it and/or modify it under the terms of the MIT License. See the COPYING file for more details. From de84b135e2bc033c063178cadd00069a3f2b3ca5 Mon Sep 17 00:00:00 2001 From: Alexey Py Date: Thu, 5 Jan 2017 00:06:09 +0300 Subject: [PATCH 2/4] Update copyright year in COPYING.md --- COPYING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/COPYING.md b/COPYING.md index bc5be3414..6be863d32 100644 --- a/COPYING.md +++ b/COPYING.md @@ -1,4 +1,4 @@ -Copyright (c) 2013-2016 Nicolas Lœuillet +Copyright (c) 2013-2017 Nicolas Lœuillet Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 3d9950792c0aef20643ce1c5f81670e1f7194af9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 17 Jan 2017 10:09:04 +0100 Subject: [PATCH 3/4] Fixed possible JS injection via the title edition --- .../views/themes/baggy/Entry/entries.html.twig | 4 ++-- .../Resources/views/themes/baggy/Entry/entry.html.twig | 6 +++--- .../views/themes/common/Entry/entries.xml.twig | 2 +- .../views/themes/common/Entry/share.html.twig | 10 +++++----- .../themes/material/Entry/_card_full_image.html.twig | 4 ++-- .../themes/material/Entry/_card_no_preview.html.twig | 4 ++-- .../themes/material/Entry/_card_preview.html.twig | 8 ++++---- .../views/themes/material/Entry/entry.html.twig | 4 ++-- var/SymfonyRequirements.php | 6 +++++- 9 files changed, 26 insertions(+), 22 deletions(-) diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig index 56a0faacf..4679714e6 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig @@ -23,7 +23,7 @@ {% for entry in entries %}
-

{{ entry.title|raw }}

+

{{ entry.title|e|raw }}

{% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
@@ -60,7 +60,7 @@
  • {{ tag.label }}
  • {% endfor %} - {{ entry.title|raw }} + {{ entry.title|e|raw }} {% endif %}
    {% endfor %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig index 3689159bc..8ca194f64 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig @@ -1,11 +1,11 @@ {% extends "WallabagCoreBundle::layout.html.twig" %} -{% block title %}{{ entry.title|raw }} ({{ entry.domainName|removeWww }}){% endblock %} +{% block title %}{{ entry.title|e|raw }} ({{ entry.domainName|removeWww }}){% endblock %} {% block content %}
    -

    {{ entry.title|raw }}

    +

    {{ entry.title|e|raw }}

    @@ -67,7 +67,7 @@
    {% if entry.previewPicture is not null %} -
    {{ entry.title|raw }}
    +
    {{ entry.title|e|raw }}
    {% endif %}
    {{ entry.content | raw }} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig index 288bb54f8..7103f22b7 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig @@ -10,7 +10,7 @@ {% for entry in entries %} - <![CDATA[{{ entry.title }}]]> + <![CDATA[{{ entry.title|e }}]]> wallabag {{ entry.url }} {{ entry.url }} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig index f77264c67..623cf1c4d 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig @@ -1,6 +1,6 @@ - {{ entry.title | raw }} + {{ entry.title|e|raw }} - + {% set picturePath = app.request.schemeAndHttpHost ~ asset('bundles/wallabagcore/themes/_global/img/logo-other_themes.png') %} @@ -38,13 +38,13 @@ - +
    -

    {{ entry.title | raw }}

    - +

    {{ entry.title|e|raw }}

    +
    {{ "entry.public.shared_by_wallabag"|trans({'%wallabag_instance%': url('homepage')})|raw }}
    diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig index 0fdd5996d..91a1bac0d 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig @@ -11,8 +11,8 @@
    - - {{ entry.title | raw | striptags | truncate(80, true, '…') }} + + {{ entry.title | e | raw | striptags | truncate(80, true, '…') }} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig index 19a400b4b..ed916e798 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig @@ -2,8 +2,8 @@
    - - {{ entry.title | raw | striptags | truncate(80, true, '…') }} + + {{ entry.title | e | raw | striptags | truncate(80, true, '…') }} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig index b0e3c06de..d23be4d09 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig @@ -13,8 +13,8 @@ more_vert - - {{ entry.title| striptags | truncate(80, true, '…') | raw }} + + {{ entry.title | e | striptags | truncate(80, true, '…') | raw }} @@ -29,8 +29,8 @@
    clear - - {{ entry.title | raw | striptags | truncate(80, true, '…') }} + + {{ entry.title | e | raw | striptags | truncate(80, true, '…') }} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig index c615a9079..b445f7d5f 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig @@ -1,6 +1,6 @@ {% extends "WallabagCoreBundle::layout.html.twig" %} -{% block title %}{{ entry.title|raw }} ({{ entry.domainName|removeWww }}){% endblock %} +{% block title %}{{ entry.title|e|raw }} ({{ entry.domainName|removeWww }}){% endblock %} {% block body_class %}entry{% endblock %} @@ -209,7 +209,7 @@ {% block content %}
    -

    {{ entry.title|raw }}

    +

    {{ entry.title|e|raw }}