]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Enable no-referrer on img tags, enable strict-origin-when-cross-origin by default
authorKevin Decherf <kevin@kdecherf.com>
Wed, 1 May 2019 12:05:38 +0000 (14:05 +0200)
committerKevin Decherf <kevin@kdecherf.com>
Fri, 10 May 2019 21:07:26 +0000 (23:07 +0200)
Fixes #3889

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
src/Wallabag/CoreBundle/Helper/ContentProxy.php
src/Wallabag/CoreBundle/Resources/views/base.html.twig

index 31953f12d3ef947babfdd1d860c63939d3643abc..bc257ffbc32ab1f8c468d3eb9cc170c67f3ffbc2 100644 (file)
@@ -47,6 +47,7 @@ class ContentProxy
      */
     public function updateEntry(Entry $entry, $url, array $content = [], $disableContentUpdate = false)
     {
+        $this->graby->toggleImgNoReferrer(true);
         if (!empty($content['html'])) {
             $content['html'] = $this->graby->cleanupHtml($content['html'], $url);
         }
index aa388bcbcbd3d5a2e062f8e1f5ab122822435589..c0eecd57499d0e6364cd47f951e3e9a8979f63af 100644 (file)
@@ -8,6 +8,7 @@
         {% block head %}
             <meta name="viewport" content="initial-scale=1.0">
             <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+            <meta name="referrer" content="strict-origin-when-cross-origin">
             <!--[if IE]>
             <meta http-equiv="X-UA-Compatible" content="IE=10">
             <![endif]-->