Skip to content

Commit 8b3241b

Browse files
committed
Joomla! 5.4.2
1 parent 2ccd259 commit 8b3241b

File tree

13 files changed

+53
-17
lines changed

13 files changed

+53
-17
lines changed

administrator/language/en-GB/install.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<name>English (en-GB)</name>
44
<tag>en-GB</tag>
55
<version>5.4.2</version>
6-
<creationDate>2025-12</creationDate>
6+
<creationDate>2026-01</creationDate>
77
<author>Joomla! Project</author>
88
<authorEmail>[email protected]</authorEmail>
99
<authorUrl>www.joomla.org</authorUrl>

administrator/language/en-GB/langmetadata.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<metafile client="administrator">
33
<name>English (en-GB)</name>
44
<version>5.4.2</version>
5-
<creationDate>2025-12</creationDate>
5+
<creationDate>2026-01</creationDate>
66
<author>Joomla! Project</author>
77
<authorEmail>[email protected]</authorEmail>
88
<authorUrl>www.joomla.org</authorUrl>

administrator/manifests/files/joomla.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<authorUrl>www.joomla.org</authorUrl>
77
<copyright>(C) 2019 Open Source Matters, Inc.</copyright>
88
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
9-
<version>5.4.2-rc2-dev</version>
10-
<creationDate>2025-12</creationDate>
9+
<version>5.4.2</version>
10+
<creationDate>2026-01</creationDate>
1111
<description>FILES_JOOMLA_XML_DESCRIPTION</description>
1212

1313
<scriptfile>administrator/components/com_admin/script.php</scriptfile>

administrator/manifests/packages/pkg_en-GB.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<name>English (en-GB) Language Pack</name>
44
<packagename>en-GB</packagename>
55
<version>5.4.2.1</version>
6-
<creationDate>2025-12</creationDate>
6+
<creationDate>2026-01</creationDate>
77
<author>Joomla! Project</author>
88
<authorEmail>[email protected]</authorEmail>
99
<authorUrl>www.joomla.org</authorUrl>

api/language/en-GB/install.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<name>English (en-GB)</name>
44
<tag>en-GB</tag>
55
<version>5.4.2</version>
6-
<creationDate>2025-12</creationDate>
6+
<creationDate>2026-01</creationDate>
77
<author>Joomla! Project</author>
88
<authorEmail>[email protected]</authorEmail>
99
<authorUrl>www.joomla.org</authorUrl>

api/language/en-GB/langmetadata.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<metafile client="api">
33
<name>English (en-GB)</name>
44
<version>5.4.2</version>
5-
<creationDate>2025-12</creationDate>
5+
<creationDate>2026-01</creationDate>
66
<author>Joomla! Project</author>
77
<authorEmail>[email protected]</authorEmail>
88
<authorUrl>www.joomla.org</authorUrl>

installation/language/en-GB/langmetadata.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<metafile client="installation">
33
<name>English (United Kingdom)</name>
44
<version>5.4.2</version>
5-
<creationDate>2025-12</creationDate>
5+
<creationDate>2026-01</creationDate>
66
<author>Joomla! Project</author>
77
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
88
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>

language/en-GB/install.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<name>English (en-GB)</name>
44
<tag>en-GB</tag>
55
<version>5.4.2</version>
6-
<creationDate>2025-12</creationDate>
6+
<creationDate>2026-01</creationDate>
77
<author>Joomla! Project</author>
88
<authorEmail>[email protected]</authorEmail>
99
<authorUrl>www.joomla.org</authorUrl>

language/en-GB/langmetadata.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<metafile client="site">
33
<name>English (en-GB)</name>
44
<version>5.4.2</version>
5-
<creationDate>2025-12</creationDate>
5+
<creationDate>2026-01</creationDate>
66
<author>Joomla! Project</author>
77
<authorEmail>[email protected]</authorEmail>
88
<authorUrl>www.joomla.org</authorUrl>

libraries/src/Filter/InputFilter.php

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
namespace Joomla\CMS\Filter;
1111

12+
use enshrined\svgSanitize\Sanitizer;
1213
use Joomla\CMS\String\PunycodeHelper;
1314
use Joomla\Filter\InputFilter as BaseInputFilter;
1415

@@ -489,4 +490,39 @@ protected function stripUSC($source)
489490

490491
return preg_replace('/[\xF0-\xF7].../s', "\xE2\xAF\x91", $source);
491492
}
493+
494+
/**
495+
* Internal method to strip a tag of disallowed attributes - extended to filter SVG content
496+
*
497+
* @param array $attrSet Array of attribute pairs to filter
498+
*
499+
* @return array Filtered array of attribute pairs
500+
*
501+
* @since 5.4.2
502+
*/
503+
protected function cleanAttributes(array $attrSet)
504+
{
505+
// Do the heavy lifting in the upstream library
506+
$attrSet = parent::cleanAttributes($attrSet);
507+
508+
// Decode and check base64-encoded svgs
509+
return array_map(
510+
function ($attribute) {
511+
// Check for presence of relevant tags
512+
if (!preg_match('/"data:.*svg.*;base64,(.*)"/U', $attribute, $matches)) {
513+
return $attribute;
514+
}
515+
516+
// Extract SVG
517+
$svg = base64_decode($matches[1], true);
518+
519+
// Sanitize svg
520+
$sanitizer = new Sanitizer();
521+
522+
// Replace content
523+
return str_replace($matches[1], base64_encode($sanitizer->sanitize($svg)), $attribute);
524+
},
525+
$attrSet,
526+
);
527+
}
492528
}

0 commit comments

Comments
 (0)