Skip to content

Commit 059073a

Browse files
committed
Add rel="noopener noreferrer" to external links in LoginPage
Prevents the linked page from accessing `window.opener` and stops the referring URL from being sent in the `Referer` header.
1 parent 8dff271 commit 059073a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

library/Icinga/Web/Widget/LoginPage.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ protected function assembleSocialLinks(): HtmlElement
175175
'href' => 'https://www.facebook.com/icinga',
176176
'target' => '_blank',
177177
'title' => $this->translate('Icinga on Facebook'),
178-
'aria-label' => $this->translate('Icinga on Facebook')
178+
'aria-label' => $this->translate('Icinga on Facebook'),
179+
'rel' => 'noopener noreferrer'
179180
]),
180181
HtmlElement::create('i', Attributes::create([
181182
'class' => 'icon-facebook-squared',
@@ -194,6 +195,7 @@ protected function assembleSocialLinks(): HtmlElement
194195
'target' => '_blank',
195196
'title' => $this->translate('Icinga on GitHub'),
196197
'aria-label' => $this->translate('Icinga on GitHub'),
198+
'rel' => 'noopener noreferrer'
197199
]),
198200
HtmlElement::create('i', Attributes::create([
199201
'class' => 'icon-github-circled',

0 commit comments

Comments
 (0)