From 8a776f146182bc6870702cfeb87041e3af66b24b Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 7 Sep 2016 14:35:51 +0200 Subject: [PATCH] Prevent a target _blank attacks with window.opener https://mathiasbynens.github.io/rel-noopener/ noopener is implied by noreferrer https://html.spec.whatwg.org/multipage/semantics.html#link-type-noreferrer The API for window.open() does not seem stable yet https://bugzilla.mozilla.org/show_bug.cgi?id=1267339 --- app/layout/aside_feed.phtml | 2 +- app/layout/aside_subscription.phtml | 2 +- app/layout/nav_menu.phtml | 2 +- app/views/configure/sharing.phtml | 4 ++-- app/views/feed/add.phtml | 6 +++--- app/views/helpers/feed/update.phtml | 6 +++--- app/views/helpers/index/normal/entry_bottom.phtml | 4 ++-- app/views/helpers/index/normal/entry_header.phtml | 4 ++-- app/views/index/normal.phtml | 2 +- p/scripts/main.js | 2 +- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml index e8fdbf842..94c281b7f 100644 --- a/app/layout/aside_feed.phtml +++ b/app/layout/aside_feed.phtml @@ -79,7 +79,7 @@
  • -
  • +
  • diff --git a/app/layout/aside_subscription.phtml b/app/layout/aside_subscription.phtml index fa10d63e8..e14afe2a7 100644 --- a/app/layout/aside_subscription.phtml +++ b/app/layout/aside_subscription.phtml @@ -10,7 +10,7 @@
  • - +
  • diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 23255f04f..d77c1abf9 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -152,7 +152,7 @@ $url_output['params']['token'] = FreshRSS_Context::$user_conf->token; } ?> - + diff --git a/app/views/configure/sharing.phtml b/app/views/configure/sharing.phtml index 0dad5bf6d..ffcfb8b29 100644 --- a/app/views/configure/sharing.phtml +++ b/app/views/configure/sharing.phtml @@ -13,7 +13,7 @@ - + '> @@ -38,7 +38,7 @@ formType() === 'advanced') { ?> - + diff --git a/app/views/feed/add.phtml b/app/views/feed/add.phtml index caf685d79..5cd59d298 100644 --- a/app/views/feed/add.phtml +++ b/app/views/feed/add.phtml @@ -30,7 +30,7 @@
    feed->website(); ?> - +
    @@ -40,9 +40,9 @@
    - +
    - +
    diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml index b7e8f68cd..bf87a255a 100644 --- a/app/views/helpers/feed/update.phtml +++ b/app/views/helpers/feed/update.phtml @@ -37,7 +37,7 @@
    - +
    @@ -46,10 +46,10 @@
    - +
    - +
    diff --git a/app/views/helpers/index/normal/entry_bottom.phtml b/app/views/helpers/index/normal/entry_bottom.phtml index 3af7436c3..a9d5a80ca 100644 --- a/app/views/helpers/index/normal/entry_bottom.phtml +++ b/app/views/helpers/index/normal/entry_bottom.phtml @@ -52,7 +52,7 @@ $share_options['title'] = $title; $share->update($share_options); ?> @@ -81,6 +81,6 @@ ?>
  • entry->date(); ?>
  • diff --git a/app/views/helpers/index/normal/entry_header.phtml b/app/views/helpers/index/normal/entry_header.phtml index dc544298f..86298e59f 100644 --- a/app/views/helpers/index/normal/entry_header.phtml +++ b/app/views/helpers/index/normal/entry_header.phtml @@ -27,7 +27,7 @@ } } ?>
  • ✇ feed->name(); ?>
  • -
  • entry->title(); ?>
  • +
  • entry->title(); ?>
  • entry->date(); ?> 
  • - + diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml index 91ebcebd3..6fda11ed9 100644 --- a/app/views/index/normal.phtml +++ b/app/views/index/normal.phtml @@ -66,7 +66,7 @@ if (!empty($this->entries)) { ?>
    -

    entry->title(); ?>

    +

    entry->title(); ?>

    entry->author(); echo $author != '' ? '
    ' . _t('gen.short.by_author', $author) . '
    ' : '', diff --git a/p/scripts/main.js b/p/scripts/main.js index 8980fe2f6..74631451a 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -752,7 +752,7 @@ function init_stream(divStream) { }); divStream.on('click', '.flux .content a', function () { - $(this).attr('target', '_blank'); + $(this).attr('target', '_blank').attr('rel', 'noreferrer'); }); if (context.auto_mark_site) {