aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorKevin Decherf <kevin@kdecherf.com>2019-05-01 14:05:38 +0200
committerKevin Decherf <kevin@kdecherf.com>2019-05-10 23:07:26 +0200
commit2dbb5b2307ceefc92b465a7cbd2d0ecf512a491b (patch)
tree9b39bab20832f5360b6785070e56ed59066c54cf /src
parent570113208bc0f53219ed6fb6bb72b6191f884bc1 (diff)
downloadwallabag-2dbb5b2307ceefc92b465a7cbd2d0ecf512a491b.tar.gz
wallabag-2dbb5b2307ceefc92b465a7cbd2d0ecf512a491b.tar.zst
wallabag-2dbb5b2307ceefc92b465a7cbd2d0ecf512a491b.zip
Enable no-referrer on img tags, enable strict-origin-when-cross-origin by default
Fixes #3889 Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/CoreBundle/Helper/ContentProxy.php1
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/base.html.twig1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
index 31953f12..bc257ffb 100644
--- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php
+++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
@@ -47,6 +47,7 @@ class ContentProxy
47 */ 47 */
48 public function updateEntry(Entry $entry, $url, array $content = [], $disableContentUpdate = false) 48 public function updateEntry(Entry $entry, $url, array $content = [], $disableContentUpdate = false)
49 { 49 {
50 $this->graby->toggleImgNoReferrer(true);
50 if (!empty($content['html'])) { 51 if (!empty($content['html'])) {
51 $content['html'] = $this->graby->cleanupHtml($content['html'], $url); 52 $content['html'] = $this->graby->cleanupHtml($content['html'], $url);
52 } 53 }
diff --git a/src/Wallabag/CoreBundle/Resources/views/base.html.twig b/src/Wallabag/CoreBundle/Resources/views/base.html.twig
index aa388bcb..c0eecd57 100644
--- a/src/Wallabag/CoreBundle/Resources/views/base.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/base.html.twig
@@ -8,6 +8,7 @@
8 {% block head %} 8 {% block head %}
9 <meta name="viewport" content="initial-scale=1.0"> 9 <meta name="viewport" content="initial-scale=1.0">
10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
11 <meta name="referrer" content="strict-origin-when-cross-origin">
11 <!--[if IE]> 12 <!--[if IE]>
12 <meta http-equiv="X-UA-Compatible" content="IE=10"> 13 <meta http-equiv="X-UA-Compatible" content="IE=10">
13 <![endif]--> 14 <![endif]-->