From db34b59238846e5ec046a456b4f76649321571d1 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Thu, 19 Oct 2017 12:16:04 +0200 Subject: Prevent XSS in links which open a new browser window --- apps/federatedfilesharing/templates/settings-admin.php | 2 +- apps/federatedfilesharing/templates/settings-personal.php | 4 ++-- apps/files/templates/appnavigation.php | 2 +- apps/theming/lib/ThemingDefaults.php | 2 +- apps/theming/tests/ThemingDefaultsTest.php | 4 ++-- apps/user_ldap/templates/part.settingcontrols.php | 2 +- apps/user_ldap/templates/part.wizardcontrols.php | 2 +- apps/workflowengine/templates/admin.php | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) (limited to 'apps') diff --git a/apps/federatedfilesharing/templates/settings-admin.php b/apps/federatedfilesharing/templates/settings-admin.php index 7fe1b5f62e6..8d04169ea89 100644 --- a/apps/federatedfilesharing/templates/settings-admin.php +++ b/apps/federatedfilesharing/templates/settings-admin.php @@ -8,7 +8,7 @@ script('federatedfilesharing', 'settings-admin');

t('Federated Cloud Sharing'));?>

-

t('Adjust how people can share between servers.')); ?>

diff --git a/apps/federatedfilesharing/templates/settings-personal.php b/apps/federatedfilesharing/templates/settings-personal.php index 26365d2b70c..89f7b1eb1e7 100644 --- a/apps/federatedfilesharing/templates/settings-personal.php +++ b/apps/federatedfilesharing/templates/settings-personal.php @@ -43,7 +43,7 @@ style('federatedfilesharing', 'settings-personal'); - t('Use this address to access your Files via WebDAV', array(link_to_docs('user-webdav'))));?> + t('Use this address to access your Files via WebDAV', array(link_to_docs('user-webdav'))));?>
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php index 6ee546d2630..97e889a2140 100644 --- a/apps/theming/lib/ThemingDefaults.php +++ b/apps/theming/lib/ThemingDefaults.php @@ -134,7 +134,7 @@ class ThemingDefaults extends \OC_Defaults { public function getShortFooter() { $slogan = $this->getSlogan(); $footer = '' .$this->getEntity() . ''. + ' rel="noreferrer noopener">' .$this->getEntity() . ''. ($slogan !== '' ? ' – ' . $slogan : ''); return $footer; diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php index abd85a612c9..6fbf3a2529d 100644 --- a/apps/theming/tests/ThemingDefaultsTest.php +++ b/apps/theming/tests/ThemingDefaultsTest.php @@ -217,7 +217,7 @@ class ThemingDefaultsTest extends TestCase { ['theming', 'slogan', $this->defaults->getSlogan(), 'Slogan'], ]); - $this->assertEquals('Name – Slogan', $this->template->getShortFooter()); + $this->assertEquals('Name – Slogan', $this->template->getShortFooter()); } public function testGetShortFooterEmptySlogan() { @@ -230,7 +230,7 @@ class ThemingDefaultsTest extends TestCase { ['theming', 'slogan', $this->defaults->getSlogan(), ''], ]); - $this->assertEquals('Name', $this->template->getShortFooter()); + $this->assertEquals('Name', $this->template->getShortFooter()); } public function testgetColorPrimaryWithDefault() { diff --git a/apps/user_ldap/templates/part.settingcontrols.php b/apps/user_ldap/templates/part.settingcontrols.php index 3f7a53dd4dc..a418885f47e 100644 --- a/apps/user_ldap/templates/part.settingcontrols.php +++ b/apps/user_ldap/templates/part.settingcontrols.php @@ -3,7 +3,7 @@ t('Test Configuration'));?> + target="_blank" rel="noreferrer noopener"> t('Help'));?> diff --git a/apps/user_ldap/templates/part.wizardcontrols.php b/apps/user_ldap/templates/part.wizardcontrols.php index 2df1fd8d83f..89eb96827e6 100644 --- a/apps/user_ldap/templates/part.wizardcontrols.php +++ b/apps/user_ldap/templates/part.wizardcontrols.php @@ -9,7 +9,7 @@ t('Continue'));?> + target="_blank" rel="noreferrer noopener"> t('Help'));?> diff --git a/apps/workflowengine/templates/admin.php b/apps/workflowengine/templates/admin.php index 4f4dab4043f..e9873f8f289 100644 --- a/apps/workflowengine/templates/admin.php +++ b/apps/workflowengine/templates/admin.php @@ -25,7 +25,7 @@

-
-- cgit v1.2.3