Skip to content

Commit

Permalink
Joomla! 4.4.1 Stable
Browse files Browse the repository at this point in the history
  • Loading branch information
MacJoom committed Nov 23, 2023
1 parent ac9aa34 commit 4ee3810
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion administrator/manifests/files/joomla.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<authorUrl>www.joomla.org</authorUrl>
<copyright>(C) 2019 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>4.4.1-rc2</version>
<version>4.4.1</version>
<creationDate>2023-11</creationDate>
<description>FILES_JOOMLA_XML_DESCRIPTION</description>

Expand Down
7 changes: 5 additions & 2 deletions libraries/src/Language/LanguageHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -420,11 +420,14 @@ public static function parseIniFile($fileName, $debug = false)

if (!\function_exists('parse_ini_file') || $isParseIniFileDisabled) {
$contents = file_get_contents($fileName);
$strings = @parse_ini_string($contents);
$strings = @parse_ini_string($contents, false, INI_SCANNER_RAW);
} else {
$strings = @parse_ini_file($fileName);
$strings = @parse_ini_file($fileName, false, INI_SCANNER_RAW);
}

// Ini files are processed in the "RAW" mode of parse_ini_string, leaving escaped quotes untouched - lets postprocess them
$strings = str_replace('\"', '"', $strings);

// Restore error tracking to what it was before.
if ($debug === true) {
ini_set('track_errors', $trackErrors);
Expand Down
4 changes: 2 additions & 2 deletions libraries/src/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ final class Version
* @var string
* @since 3.8.0
*/
public const EXTRA_VERSION = 'rc2';
public const EXTRA_VERSION = '';

/**
* Development status.
*
* @var string
* @since 3.5
*/
public const DEV_STATUS = 'Release Candidate';
public const DEV_STATUS = 'Stable';

/**
* Code name.
Expand Down

7 comments on commit 4ee3810

@BrainforgeUK
Copy link
Contributor

@BrainforgeUK BrainforgeUK commented on 4ee3810 Nov 30, 2023

Choose a reason for hiding this comment

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

LanguageHelper.php
Why has INI_SCANNER_RAW been added to parse_ini_file / parse_ini_string on lines 423, 425?

@parse_ini_file($fileName, false, INI_SCANNER_RAW);

Works in most cases, but got a couple of extensions where it fails to parse the language file.

Example parses OK
PLG_ACCESSMESSAGE="This location must be accessible to PHP.<br/>Your <i>open_basedir</i> configuration in <i>php.ini</i> may restrict this."

Exampe does not parse
PLG_ACCESSMESSAGE="This location must be accessible to PHP.<br/>
Your <i>open_basedir configuration in <i>php.ini may restrict this."

@brianteeman
Copy link
Contributor

Choose a reason for hiding this comment

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

the change was for security purposes

@ceford
Copy link
Contributor

@ceford ceford commented on 4ee3810 Dec 2, 2023

Choose a reason for hiding this comment

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

Is there some background information on the parseIniFile change? I have also been caught out because I had some multi-line ini strings in my extensions. And does this count as a backward compatibility break?

@BrainforgeUK
Copy link
Contributor

@BrainforgeUK BrainforgeUK commented on 4ee3810 Dec 2, 2023

Choose a reason for hiding this comment

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

Looking at the PHP examples Joomla language handling is only interested in character strings.
https://www.php.net/manual/en/function.parse-ini-string.php

So we can forget all the other stuff.
We can also forget about using parse_ini_string.

In my pull request #42441 I am just in process of removing call to parse_ini_string() as it is pointless.
Will keep it in the $unexpectedFileContents handling section ... just in case someone doing something unexpected.
But if they are ... will Joomla language handling work in that scenario anyway? I doubt it!

@brianteeman
Copy link
Contributor

@brianteeman brianteeman commented on 4ee3810 Dec 2, 2023 via email

Choose a reason for hiding this comment

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

@BrainforgeUK
Copy link
Contributor

@BrainforgeUK BrainforgeUK commented on 4ee3810 Dec 2, 2023

Choose a reason for hiding this comment

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

Then the documentation is wrong and it needs to be corrected.
I have updated #42441 accordingly.

@ceford
Copy link
Contributor

@ceford ceford commented on 4ee3810 Dec 2, 2023

Choose a reason for hiding this comment

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

It's not a b/c break because the documentation says to create each language string on a line

Which documentation? This one: https://docs.joomla.org/Creating_a_language_definition_file had a comment about single lines in 4.4.1 and 5.0.1 added yesterday (2023-12-01). This one does not mention it: https://developer.joomla.org/coding-standards/ini.html (and the link to the Specification of Language Files leads to a deleted page, and the link to the User Interface Text Guidelines does not mention it). I can't think of anywhere else to look.

Please sign in to comment.