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.
This commit is contained in:
Johannes Rauh 2026-05-11 13:23:42 +02:00
parent 8dff2712a1
commit 059073a5db

View file

@ -175,7 +175,8 @@ class LoginPage extends HtmlDocument
'href' => 'https://www.facebook.com/icinga',
'target' => '_blank',
'title' => $this->translate('Icinga on Facebook'),
'aria-label' => $this->translate('Icinga on Facebook')
'aria-label' => $this->translate('Icinga on Facebook'),
'rel' => 'noopener noreferrer'
]),
HtmlElement::create('i', Attributes::create([
'class' => 'icon-facebook-squared',
@ -194,6 +195,7 @@ class LoginPage extends HtmlDocument
'target' => '_blank',
'title' => $this->translate('Icinga on GitHub'),
'aria-label' => $this->translate('Icinga on GitHub'),
'rel' => 'noopener noreferrer'
]),
HtmlElement::create('i', Attributes::create([
'class' => 'icon-github-circled',