? ? Pending

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
24 Jan 2018

Pull Request for Issue #18301 (comment)

Summary of Changes

Is there a reason why all the language strings are in the .sys.ini language file and not spread across two language files as normal

Thanks @brianteeman

  • Fixing the postinstall behavior as this was broken before.

Testing Instructions

  • install this branch https://github.com/zero-24/joomla-cms/archive/httpheader.zip
  • Check the config page of the httpheader plugin and make sure all language strings are still loaded. -
  • Check the postinstall message and make sure all language strings are still loaded too. (please make sure to disable the plugin inorder to trigger the postinstall message)

Expected result

two files & postinstall works also on new installs

Actual result

one file & postinstall is broken.

avatar zero-24 zero-24 - open - 24 Jan 2018
avatar zero-24 zero-24 - change - 24 Jan 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Jan 2018
Category SQL Administration com_admin Postgresql Language & Strings Installation Front End Plugins
avatar infograf768
infograf768 - comment - 25 Jan 2018

The xml file has no manifest part for languages. I suggest to add them.

	<languages>
		<language tag="en-GB">en-GB.plg_system_httpheader.ini</language>
		<language tag="en-GB">en-GB.plg_system_httpheader.sys.ini</language>
	</languages>
avatar zero-24 zero-24 - change - 25 Jan 2018
Labels Added: ? ?
avatar infograf768
infograf768 - comment - 25 Jan 2018

There are other things that can be done for customhttpheader.xml but it could be done in another PR;

  1. windows eol should be modified to Unix
  2. No use to utilize specific strings for Site and Administrator as we already have the global ones, JSITE and JADMINISTRATOR.
  3. String PLG_SYSTEM_HTTPHEADER_ADDITIONAL_HEADER_CLIENT="Site selection" proposing Site, Administrator or Both, makes no sense. It should have "Client" as value.
avatar zero-24
zero-24 - comment - 25 Jan 2018

Thanks fixed.

avatar zero-24
zero-24 - comment - 24 Feb 2018

@wilsonge if you have a few minutes please take care that this is merged before the next release as this is going to rename the current plg_system_httpheader to plg_system_httpheaders so it is not going to conflict with the original version currently used in 3.x

avatar infograf768
infograf768 - comment - 24 Feb 2018

I was not aware we had a plg_system_httpheader in 3.x

avatar zero-24
zero-24 - comment - 24 Feb 2018

I was not aware we had a plg_system_httpheader in 3.x

https://github.com/zero-24/plg_system_httpheader

This is the base version for the 4.0.0 and you can use that on any 3.xer site you want :)

avatar Quy
Quy - comment - 24 Feb 2018

Referrer-Policy setting will not save Disabled.

avatar zero-24
zero-24 - comment - 24 Feb 2018

Just pushed the changes for disabled.

avatar Quy
Quy - comment - 24 Feb 2018

Remove extra blank lines.

The Enable default security headers button does nothing.

header-postinstall

avatar zero-24
zero-24 - comment - 24 Feb 2018

The Enable default security headers button does nothing.

can you please double check that? It should just enable the plugin currently there is no redirection implemented.

avatar Quy
Quy - comment - 24 Feb 2018

Still disabled. I expect the postinstall message to disappear after clicking the button if the plugin is to be enabled.

avatar zero-24
zero-24 - comment - 24 Feb 2018

Still disabled. I expect the postinstall message to disappear after clicking the button if the plugin is enabled.

Sure. hmm I'm going to debug this one. Maybe i'm also going to redirect the user to the edit page so they can configure the needed values in the plugin if they hit enable. Let's see what is the problem and how to fix it.

avatar zero-24
zero-24 - comment - 24 Feb 2018

I have just fixed the button. A redirect to the plugin edit page is not possible ;)

avatar brianteeman
brianteeman - comment - 24 Feb 2018

Yes it is - i did it in the recaptcha v1 pr #19648 or i misunderstand

avatar zero-24
zero-24 - comment - 24 Feb 2018

I'm going to review that proposal. Thanks!

avatar zero-24
zero-24 - comment - 24 Feb 2018

hmm look like this is working. My test before that resulted into a "you are not allowed to use this link directly" error. Now this is fixed. So commit is in coming. Thanks @brianteeman

avatar Quy
Quy - comment - 2 Mar 2018

The default headers are not set. A var dump of $this->params->get('xframeoptions') results in string(1) "1" which is not the same type as ===1.

		// X-Frame-Options
		if ($this->params->get('xframeoptions', 1) === 1)
		{
			$this->app->setHeader('X-Frame-Options', 'SAMEORIGIN');
		}
avatar zero-24
zero-24 - comment - 2 Mar 2018

Thanks should be fixed by the last commit.

avatar Quy
Quy - comment - 5 Mar 2018

I had to save the plugin initially before it would be in effect. 1 should be a string as follows:

get('xframeoptions', '1')

avatar Quy
Quy - comment - 5 Mar 2018

I am testing with your branch rather than via PatchTester. This is the error I get when doing a fresh install. I know it is unrelated to your PR, but how to fix it?
0 Could not create session directory "/var/lib/php/session"

avatar zero-24
zero-24 - comment - 5 Mar 2018

Hmm i have no idea how the session things works nowdays in 4.0 can your user write to that path?

avatar wilsonge wilsonge - change - 9 Mar 2018
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-03-09 10:46:50
Closed_By wilsonge
avatar wilsonge wilsonge - close - 9 Mar 2018
avatar wilsonge wilsonge - merge - 9 Mar 2018
avatar wilsonge
wilsonge - comment - 9 Mar 2018

Thanks Tobias :)

avatar zero-24
zero-24 - comment - 9 Mar 2018

?

Add a Comment

Login with GitHub to post a comment