Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] Move the additional language strings in a separate file & fix postinstall #19449

Merged
merged 39 commits into from Mar 9, 2018
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4cdc6f6
move the additional language strings in a seperate file
zero-24 Jan 24, 2018
24f6e25
some other fixes for the postinstall message ...
zero-24 Jan 24, 2018
f09e5f7
add language thanks @infograf768
zero-24 Jan 25, 2018
59de753
Update en-GB.plg_system_httpheader.ini
zero-24 Jan 25, 2018
b8fe484
Update customhttpheader.xml
zero-24 Jan 25, 2018
6af7b73
add migration for already installed plugin version by converting the …
zero-24 Jan 27, 2018
8fd5d22
Merge branch 'httpheader' of github.com:zero-24/joomla-cms into httph…
zero-24 Jan 27, 2018
e5f10c0
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into httpheader
zero-24 Jan 27, 2018
4e28bda
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into httpheader
zero-24 Jan 29, 2018
b205a2c
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into httpheader
zero-24 Jan 31, 2018
6712246
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into httpheader
zero-24 Feb 2, 2018
a4c2e46
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into httpheader
zero-24 Feb 4, 2018
7f6d14d
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into httpheader
zero-24 Feb 6, 2018
f820fb5
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into httpheader
zero-24 Feb 6, 2018
5f2ed28
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into httpheader
zero-24 Feb 7, 2018
763fcf5
merge conflicts
zero-24 Feb 10, 2018
ad0d124
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into httpheader
zero-24 Feb 13, 2018
c55fda7
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into httpheader
zero-24 Feb 14, 2018
dd0b71f
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into httpheader
zero-24 Feb 17, 2018
730c48a
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into httpheader
zero-24 Feb 18, 2018
a7565e5
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into httpheader
zero-24 Feb 18, 2018
501fd19
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into httpheader
zero-24 Feb 21, 2018
cad9942
rename from httpheader to httpheaders as there is already my plugin o…
zero-24 Feb 24, 2018
2cb28af
add missing files
zero-24 Feb 24, 2018
2e5174a
one missing change
zero-24 Feb 24, 2018
2252d5c
fixed missing change
zero-24 Feb 24, 2018
8ec17f2
handle disabled setting
zero-24 Feb 24, 2018
13f3cff
thanks @quy
zero-24 Feb 24, 2018
d06a965
postinstall message
zero-24 Feb 24, 2018
9cddfc5
postinstall message drop another break
zero-24 Feb 24, 2018
cd3904f
drop <p> tag
zero-24 Feb 24, 2018
97117ac
fix httpheaders plugin postinstall message action
zero-24 Feb 24, 2018
d7dfba1
implement redirect to the plugin edit page thanks @brianteeman
zero-24 Feb 24, 2018
0d60307
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into httpheader
zero-24 Feb 26, 2018
f3883f6
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into httpheader
zero-24 Mar 1, 2018
d392890
thanks @quy
zero-24 Mar 2, 2018
ad1ff56
thanks @quy
zero-24 Mar 5, 2018
b0a7784
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into httpheader
zero-24 Mar 5, 2018
4bd2ecf
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into httpheader
zero-24 Mar 7, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,6 +1,6 @@
INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
(487, 'plg_system_httpheader', 'plugin', 'httpheader', 'system', 0, 0, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);
(487, 'plg_system_httpheaders', 'plugin', 'httpheaders', 'system', 0, 0, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);

INSERT INTO `#__postinstall_messages` (`extension_id`, `title_key`, `description_key`, `action_key`, `language_extension`, `language_client_id`, `type`, `action_file`, `action`, `condition_file`, `condition_method`, `version_introduced`, `enabled`)
VALUES
(NULL, 487, 'PLG_SYSTEM_HTTPHEADER_POSTINSTALL_INTRODUCTION_TITLE', 'PLG_SYSTEM_HTTPHEADER_POSTINSTALL_INTRODUCTION_BODY', 'PLG_SYSTEM_HTTPHEADER_POSTINSTALL_INTRODUCTION_ACTION', 'plg_system_httpheader', 1, 'action', 'site://plugins/system/httpheader/postinstall/introduction.php', 'httpheader_postinstall_action', 'site://plugins/system/httpheader/postinstall/introduction.php', 'httpheader_postinstall_condition', '4.0.0', 1);
(700, 'PLG_SYSTEM_HTTPHEADERS_POSTINSTALL_INTRODUCTION_TITLE', 'PLG_SYSTEM_HTTPHEADERS_POSTINSTALL_INTRODUCTION_BODY', 'PLG_SYSTEM_HTTPHEADERS_POSTINSTALL_INTRODUCTION_ACTION', 'plg_system_httpheaders', 1, 'action', 'site://plugins/system/httpheaders/postinstall/introduction.php', 'httpheaders_postinstall_action', 'site://plugins/system/httpheaders/postinstall/introduction.php', 'httpheaders_postinstall_condition', '4.0.0', 1);
@@ -1,6 +1,6 @@
INSERT INTO "#__extensions" ("extension_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state") VALUES
(487, 'plg_system_httpheader', 'plugin', 'httpheader', 'system', 0, 0, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);
(487, 'plg_system_httpheaders', 'plugin', 'httpheaders', 'system', 0, 0, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);

INSERT INTO "#__postinstall_messages" ("extension_id", "title_key", "description_key", "action_key", "language_extension", "language_client_id", "type", "action_file", "action", "condition_file", "condition_method", "version_introduced", "enabled")
VALUES
(NULL, 487, 'PLG_SYSTEM_HTTPHEADER_POSTINSTALL_INTRODUCTION_TITLE', 'PLG_SYSTEM_HTTPHEADER_POSTINSTALL_INTRODUCTION_BODY', 'PLG_SYSTEM_HTTPHEADER_POSTINSTALL_INTRODUCTION_ACTION', 'plg_system_httpheader', 1, 'action', 'site://plugins/system/httpheader/postinstall/introduction.php', 'httpheader_postinstall_action', 'site://plugins/system/httpheader/postinstall/introduction.php', 'httpheader_postinstall_condition', '4.0.0', 1);
(700, 'PLG_SYSTEM_HTTPHEADERS_POSTINSTALL_INTRODUCTION_TITLE', 'PLG_SYSTEM_HTTPHEADERS_POSTINSTALL_INTRODUCTION_BODY', 'PLG_SYSTEM_HTTPHEADERS_POSTINSTALL_INTRODUCTION_ACTION', 'plg_system_httpheaders', 1, 'action', 'site://plugins/system/httpheaders/postinstall/introduction.php', 'httpheaders_postinstall_action', 'site://plugins/system/httpheaders/postinstall/introduction.php', 'httpheaders_postinstall_condition', '4.0.0', 1);
30 changes: 0 additions & 30 deletions administrator/language/en-GB/en-GB.plg_system_httpheader.sys.ini

This file was deleted.

28 changes: 28 additions & 0 deletions administrator/language/en-GB/en-GB.plg_system_httpheaders.ini
@@ -0,0 +1,28 @@
; Joomla! Project
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8

PLG_SYSTEM_HTTPHEADERS="System - HTTPHeaders"
PLG_SYSTEM_HTTPHEADERS_XML_DESCRIPTION="This Plugin can set some Security HTTP Headers"
PLG_SYSTEM_HTTPHEADERS_ADDITIONAL_HEADER="Define additional HTTP Header"
PLG_SYSTEM_HTTPHEADERS_ADDITIONAL_HEADER_DESC="Using this you can set also different values from the default ones and also additional headers when it is supported. The supported headers are: <br><ul><li>Strict-Transport-Security</li><li>Content-Security-Policy</li><li>Content-Security-Policy-Report-Only</li><li>X-Frame-Options</li><li>X-XSS-Protection</li><li>X-Content-Type-Options</li><li>Referrer-Policy</li><li>Expect-CT</li></ul>"
PLG_SYSTEM_HTTPHEADERS_ADDITIONAL_HEADER_CLIENT="Client"
PLG_SYSTEM_HTTPHEADERS_ADDITIONAL_HEADER_CLIENT_BOTH="Both"
PLG_SYSTEM_HTTPHEADERS_ADDITIONAL_HEADER_KEY="HTTP Header"
PLG_SYSTEM_HTTPHEADERS_ADDITIONAL_HEADER_VALUE="HTTP Header Value"
PLG_SYSTEM_HTTPHEADERS_POSTINSTALL_INTRODUCTION_TITLE="HTTP Security Headers"
PLG_SYSTEM_HTTPHEADERS_POSTINSTALL_INTRODUCTION_BODY="<p>Joomla! comes with a built-in plugin that handles http security headers. It helps to secure your site by setting the following headers with the default values:<br><ul><li><a href='https://scotthelme.co.uk/hardening-your-http-response-headers/#x-frame-options'>'X-Frame-Options: SAMEORIGIN'</a></li><li><a href='https://scotthelme.co.uk/hardening-your-http-response-headers/#x-xss-protection'>'X-XSS-Protection: 1; mode=block'</a></li><li><a href='https://scotthelme.co.uk/hardening-your-http-response-headers/#x-content-type-options'>'X-Content-Type-Options: nosniff'</a></li><li><a href='https://scotthelme.co.uk/a-new-security-header-referrer-policy/'>'Referrer-Policy: no-referrer-when-downgrade'</a></li></ul><br>The full list of supported headers are: <br><ul><li><a href='https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security'>Strict-Transport-Security</a></li><li><a href='https://en.wikipedia.org/wiki/Content_Security_Policy'>Content-Security-Policy</a></li><li>Content-Security-Policy-Report-Only</li><li>X-Frame-Options</li><li>X-XSS-Protection</li><li>X-Content-Type-Options</li><li>Referrer-Policy</li><li>Expect-CT</li></ul><br>These headers help your browser to protect your website from <a href='https://en.wikipedia.org/wiki/Cross-site_scripting'>XSS</a> and <a href='https://en.wikipedia.org/wiki/Clickjacking'>Clickjacking</a> attacks.</p>"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<ul> tag should not be inside a <p> tag.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<p> - tag is removed now.

PLG_SYSTEM_HTTPHEADERS_POSTINSTALL_INTRODUCTION_ACTION="Enable default security headers"
PLG_SYSTEM_HTTPHEADERS_REFERRERPOLICY="Referrer-Policy"
PLG_SYSTEM_HTTPHEADERS_REFERRERPOLICY_NO_REFERRER="no-referrer"
PLG_SYSTEM_HTTPHEADERS_REFERRERPOLICY_NO_REFERRER_WHEN_DOWNGRADE="no-referrer-when-downgrade"
PLG_SYSTEM_HTTPHEADERS_REFERRERPOLICY_SAME_ORIGIN="same-origin"
PLG_SYSTEM_HTTPHEADERS_REFERRERPOLICY_ORIGIN="origin"
PLG_SYSTEM_HTTPHEADERS_REFERRERPOLICY_STRICT_ORIGIN="strict-origin"
PLG_SYSTEM_HTTPHEADERS_REFERRERPOLICY_ORIGIN_WHEN_CROSS_ORIGIN="origin-when-cross-origin"
PLG_SYSTEM_HTTPHEADERS_REFERRERPOLICY_STRICT_ORIGIN_WEHN_CROSS_ORIGIN="strict-origin-when-cross-origin"
PLG_SYSTEM_HTTPHEADERS_REFERRERPOLICY_UNSAFE_URL="unsafe-url"
PLG_SYSTEM_HTTPHEADERS_XCONTENTTYPEOPTIONS="X-Content-Type-Options"
PLG_SYSTEM_HTTPHEADERS_XFRAMEOPTIONS="X-Frame-Options"
PLG_SYSTEM_HTTPHEADERS_XXSSPROTECTION="X-XSS-Protection"
@@ -0,0 +1,7 @@
; Joomla! Project
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8

PLG_SYSTEM_HTTPHEADERS="System - HTTPHeaders"
PLG_SYSTEM_HTTPHEADERS_XML_DESCRIPTION="This Plugin can set some Security HTTP Headers"
5 changes: 3 additions & 2 deletions installation/sql/mysql/joomla.sql
Expand Up @@ -643,7 +643,7 @@ INSERT INTO `#__extensions` (`extension_id`, `package_id`, `name`, `type`, `elem
(484, 0, 'plg_media-action_resize', 'plugin', 'resize', 'media-action', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0, ''),
(485, 0, 'plg_media-action_rotate', 'plugin', 'rotate', 'media-action', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0, ''),
(486, 0, 'plg_installer_webinstaller', 'plugin', 'webinstaller', 'installer', 0, 1, 1, 0, '', '{"tab_position":"1"}', 0, '0000-00-00 00:00:00', 0, 0, ''),
(487, 0, 'plg_system_httpheader', 'plugin', 'httpheader', 'system', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0, ''),
(487, 0, 'plg_system_httpheaders', 'plugin', 'httpheaders', 'system', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0, ''),
(509, 0, 'atum', 'template', 'atum', '', 1, 1, 1, 0, '', '', 0, '0000-00-00 00:00:00', 0, 0, ''),
(510, 0, 'cassiopeia', 'template', 'cassiopeia', '', 0, 1, 1, 0, '', '{"logoFile":"","fluidContainer":"0","sidebarLeftWidth":"3","sidebarRightWidth":"3"}', 0, '0000-00-00 00:00:00', 0, 0, ''),
(600, 802, 'English (en-GB)', 'language', 'en-GB', '', 0, 1, 1, 1, '', '', 0, '0000-00-00 00:00:00', 0, 0, ''),
Expand Down Expand Up @@ -1640,7 +1640,8 @@ INSERT INTO `#__postinstall_messages` (`extension_id`, `title_key`, `description
(700, 'PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_TITLE', 'PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_BODY', 'PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_ACTION', 'plg_twofactorauth_totp', 1, 'action', 'site://plugins/twofactorauth/totp/postinstall/actions.php', 'twofactorauth_postinstall_action', 'site://plugins/twofactorauth/totp/postinstall/actions.php', 'twofactorauth_postinstall_condition', '3.2.0', 1),
(700, 'COM_CPANEL_WELCOME_BEGINNERS_TITLE', 'COM_CPANEL_WELCOME_BEGINNERS_MESSAGE', '', 'com_cpanel', 1, 'message', '', '', '', '', '3.2.0', 1),
(700, 'COM_CPANEL_MSG_STATS_COLLECTION_TITLE', 'COM_CPANEL_MSG_STATS_COLLECTION_BODY', '', 'com_cpanel', 1, 'message', '', '', 'admin://components/com_admin/postinstall/statscollection.php', 'admin_postinstall_statscollection_condition', '3.5.0', 1),
(700, 'PLG_SYSTEM_UPDATENOTIFICATION_POSTINSTALL_UPDATECACHETIME', 'PLG_SYSTEM_UPDATENOTIFICATION_POSTINSTALL_UPDATECACHETIME_BODY', 'PLG_SYSTEM_UPDATENOTIFICATION_POSTINSTALL_UPDATECACHETIME_ACTION', 'plg_system_updatenotification', 1, 'action', 'site://plugins/system/updatenotification/postinstall/updatecachetime.php', 'updatecachetime_postinstall_action', 'site://plugins/system/updatenotification/postinstall/updatecachetime.php', 'updatecachetime_postinstall_condition', '3.6.3', 1);
(700, 'PLG_SYSTEM_UPDATENOTIFICATION_POSTINSTALL_UPDATECACHETIME', 'PLG_SYSTEM_UPDATENOTIFICATION_POSTINSTALL_UPDATECACHETIME_BODY', 'PLG_SYSTEM_UPDATENOTIFICATION_POSTINSTALL_UPDATECACHETIME_ACTION', 'plg_system_updatenotification', 1, 'action', 'site://plugins/system/updatenotification/postinstall/updatecachetime.php', 'updatecachetime_postinstall_action', 'site://plugins/system/updatenotification/postinstall/updatecachetime.php', 'updatecachetime_postinstall_condition', '3.6.3', 1),
(700, 'PLG_SYSTEM_HTTPHEADERS_POSTINSTALL_INTRODUCTION_TITLE', 'PLG_SYSTEM_HTTPHEADERS_POSTINSTALL_INTRODUCTION_BODY', 'PLG_SYSTEM_HTTPHEADERS_POSTINSTALL_INTRODUCTION_ACTION', 'plg_system_httpheaders', 1, 'action', 'site://plugins/system/httpheaders/postinstall/introduction.php', 'httpheaders_postinstall_action', 'site://plugins/system/httpheaders/postinstall/introduction.php', 'httpheaders_postinstall_condition', '4.0.0', 1);
-- --------------------------------------------------------

--
Expand Down
5 changes: 3 additions & 2 deletions installation/sql/postgresql/joomla.sql
Expand Up @@ -655,7 +655,7 @@ INSERT INTO "#__extensions" ("extension_id", "package_id", "name", "type", "elem
(484, 0, 'plg_media-action_resize', 'plugin', 'resize', 'media-action', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0, ''),
(485, 0, 'plg_media-action_rotate', 'plugin', 'rotate', 'media-action', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0, ''),
(486, 0, 'plg_installer_webinstaller', 'plugin', 'webinstaller', 'installer', 0, 1, 1, 0, '', '{"tab_position":"1"}', 0, '0000-00-00 00:00:00', 0, 0, ''),
(487, 0, 'plg_system_httpheader', 'plugin', 'httpheader', 'system', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0, ''),
(487, 0, 'plg_system_httpheaders', 'plugin', 'httpheaders', 'system', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0, ''),
(600, 802, 'English (en-GB)', 'language', 'en-GB', '', 0, 1, 1, 1, '', '', 0, '1970-01-01 00:00:00', 0, 0, ''),
(601, 802, 'English (en-GB)', 'language', 'en-GB', '', 1, 1, 1, 1, '', '', 0, '1970-01-01 00:00:00', 0, 0, ''),
(700, 0, 'files_joomla', 'file', 'joomla', '', 0, 1, 1, 1, '', '', 0, '1970-01-01 00:00:00', 0, 0, ''),
Expand Down Expand Up @@ -1623,7 +1623,8 @@ INSERT INTO "#__postinstall_messages" ("extension_id", "title_key", "description
(700, 'PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_TITLE', 'PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_BODY', 'PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_ACTION', 'plg_twofactorauth_totp', 1, 'action', 'site://plugins/twofactorauth/totp/postinstall/actions.php', 'twofactorauth_postinstall_action', 'site://plugins/twofactorauth/totp/postinstall/actions.php', 'twofactorauth_postinstall_condition', '3.2.0', 1),
(700, 'COM_CPANEL_WELCOME_BEGINNERS_TITLE', 'COM_CPANEL_WELCOME_BEGINNERS_MESSAGE', '', 'com_cpanel', 1, 'message', '', '', '', '', '3.2.0', 1),
(700, 'COM_CPANEL_MSG_STATS_COLLECTION_TITLE', 'COM_CPANEL_MSG_STATS_COLLECTION_BODY', '', 'com_cpanel', 1, 'message', '', '', 'admin://components/com_admin/postinstall/statscollection.php', 'admin_postinstall_statscollection_condition', '3.5.0', 1),
(700, 'PLG_SYSTEM_UPDATENOTIFICATION_POSTINSTALL_UPDATECACHETIME', 'PLG_SYSTEM_UPDATENOTIFICATION_POSTINSTALL_UPDATECACHETIME_BODY', 'PLG_SYSTEM_UPDATENOTIFICATION_POSTINSTALL_UPDATECACHETIME_ACTION', 'plg_system_updatenotification', 1, 'action', 'site://plugins/system/updatenotification/postinstall/updatecachetime.php', 'updatecachetime_postinstall_action', 'site://plugins/system/updatenotification/postinstall/updatecachetime.php', 'updatecachetime_postinstall_condition', '3.6.3', 1);
(700, 'PLG_SYSTEM_UPDATENOTIFICATION_POSTINSTALL_UPDATECACHETIME', 'PLG_SYSTEM_UPDATENOTIFICATION_POSTINSTALL_UPDATECACHETIME_BODY', 'PLG_SYSTEM_UPDATENOTIFICATION_POSTINSTALL_UPDATECACHETIME_ACTION', 'plg_system_updatenotification', 1, 'action', 'site://plugins/system/updatenotification/postinstall/updatecachetime.php', 'updatecachetime_postinstall_action', 'site://plugins/system/updatenotification/postinstall/updatecachetime.php', 'updatecachetime_postinstall_condition', '3.6.3', 1),
(700, 'PLG_SYSTEM_HTTPHEADERS_POSTINSTALL_INTRODUCTION_TITLE', 'PLG_SYSTEM_HTTPHEADERS_POSTINSTALL_INTRODUCTION_BODY', 'PLG_SYSTEM_HTTPHEADERS_POSTINSTALL_INTRODUCTION_ACTION', 'plg_system_httpheaders', 1, 'action', 'site://plugins/system/httpheaders/postinstall/introduction.php', 'httpheaders_postinstall_action', 'site://plugins/system/httpheaders/postinstall/introduction.php', 'httpheaders_postinstall_condition', '4.0.0', 1);
--
-- Table structure for table `#__redirect_links`
--
Expand Down
23 changes: 0 additions & 23 deletions plugins/system/httpheader/subform/customhttpheader.xml

This file was deleted.

Expand Up @@ -17,7 +17,7 @@
*
* @since __DEPLOY_VERSION__
*/
class PlgSystemHttpHeader extends CMSPlugin implements SubscriberInterface
class PlgSystemHttpHeaders extends CMSPlugin implements SubscriberInterface
{
/**
* If true, language files will be loaded automatically.
Expand Down Expand Up @@ -79,7 +79,7 @@ public function setHttpHeaders()
$this->setDefaultHeader();

// Handle the additional httpheader
$httpHeaders = $this->params->get('additional_httpheader', array());
$httpHeaders = $this->params->get('additional_httpheaders', array());

foreach ($httpHeaders as $httpHeader)
{
Expand Down Expand Up @@ -124,6 +124,11 @@ private function setDefaultHeader()
}

// Referrer-Policy
$this->app->setHeader('Referrer-Policy', $this->params->get('referrerpolicy', 'no-referrer-when-downgrade'));
$referrerpolicy = $this->params->get('referrerpolicy', 'no-referrer-when-downgrade');

if ($referrerpolicy !== 'disabled')
{
$this->app->setHeader('Referrer-Policy', $referrerpolicy);
}
}
}