Skip to content

Commit 4cf418c

Browse files
author
SharkyKZ
authored
Merge branch 'staging' into j3/categoriesOnTheFly
2 parents 93ebf03 + 6c6824f commit 4cf418c

File tree

104 files changed

+681
-576
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+681
-576
lines changed

.github/SECURITY.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ This document outlines security procedures and policies for the `Joomla! Project
99

1010
## Reporting a Bug
1111

12-
The `Joomla` team and community take all security bugs in `Joomla` seriously.
13-
14-
The Joomla! Project takes security vulnerabilities very seriously. As such, the Joomla! Security Strike Team (JSST) oversees the project's security issues and follows some specific procedures when dealing with these issues.
12+
The `Joomla` team and community take all security bugs in `Joomla` seriously. The Joomla! Security Strike Team (JSST) oversees the project's security issues and follows some specific procedures when dealing with these issues.
1513

1614
If you find a possible vulnerability, please report it to the JSST using the [online form](https://developer.joomla.org/security/contact-the-team.html) or via email at [email protected]
1715

@@ -25,7 +23,7 @@ Thank you for improving the security of `Joomla`.
2523

2624
## Response Handling
2725

28-
The JSST aims to ensure all issues are handled in a timely manner and for clear communication between the team and issue reporters. As such, we have established the following guidelines for responding to issue reports:
26+
The JSST aims to ensure all issues are handled in a timely manner and for clear communication between the team and issue reporters. We have established the following guidelines for responding to issue reports:
2927

3028
* Within 24 hours every report gets acknowledged
3129
* Within 7 days every report gets a further response stating either

administrator/components/com_actionlogs/helpers/actionlogs.php

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@
2323
*/
2424
class ActionlogsHelper
2525
{
26+
/**
27+
* Array of characters starting a formula
28+
*
29+
* @var array
30+
* @since 3.9.7
31+
*/
32+
private static $characters = array('=', '+', '-', '@');
33+
2634
/**
2735
* Method to convert logs objects array to an iterable type for use with a CSV export
2836
*
@@ -54,6 +62,8 @@ public static function getCsvData($data)
5462
return ActionlogsHelperPhp55::getCsvAsGenerator($data);
5563
}
5664

65+
$disabledText = Text::_('COM_ACTIONLOGS_DISABLED');
66+
5767
$rows = array();
5868

5969
// Header row
@@ -68,11 +78,11 @@ public static function getCsvData($data)
6878

6979
$rows[] = array(
7080
'id' => $log->id,
71-
'message' => strip_tags(static::getHumanReadableLogMessage($log, false)),
81+
'message' => self::escapeCsvFormula(strip_tags(static::getHumanReadableLogMessage($log, false))),
7282
'date' => $date->format('Y-m-d H:i:s T'),
73-
'extension' => Text::_($extension),
74-
'name' => $log->name,
75-
'ip_address' => Text::_($log->ip_address),
83+
'extension' => self::escapeCsvFormula(Text::_($extension)),
84+
'name' => self::escapeCsvFormula($log->name),
85+
'ip_address' => self::escapeCsvFormula($log->ip_address === 'COM_ACTIONLOGS_DISABLED' ? $disabledText : $log->ip_address)
7686
);
7787
}
7888

@@ -205,7 +215,7 @@ public static function getHumanReadableLogMessage($log, $generateLinks = true)
205215
$messageData['type'] = Text::_($messageData['type']);
206216
}
207217

208-
$linkMode = Factory::getApplication()->get('force_ssl', 0) >= 1 ? 1 : -1;
218+
$linkMode = Factory::getApplication()->get('force_ssl', 0) >= 1 ? Route::TLS_FORCE : Route::TLS_IGNORE;
209219

210220
foreach ($messageData as $key => $value)
211221
{
@@ -339,4 +349,28 @@ public static function loadActionLogPluginsLanguage()
339349
// Load com_privacy too.
340350
$lang->load('com_privacy', JPATH_ADMINISTRATOR, null, false, true);
341351
}
352+
353+
/**
354+
* Escapes potential characters that start a formula in a CSV value to prevent injection attacks
355+
*
356+
* @param mixed $value csv field value
357+
*
358+
* @return mixed
359+
*
360+
* @since 3.9.7
361+
*/
362+
protected static function escapeCsvFormula($value)
363+
{
364+
if ($value == '')
365+
{
366+
return $value;
367+
}
368+
369+
if (in_array($value[0], self::$characters, true))
370+
{
371+
$value = ' ' . $value;
372+
}
373+
374+
return $value;
375+
}
342376
}

administrator/components/com_actionlogs/helpers/actionlogsphp55.php

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@
2323
*/
2424
class ActionlogsHelperPhp55
2525
{
26+
/**
27+
* Array of characters starting a formula
28+
*
29+
* @var array
30+
* @since 3.9.7
31+
*/
32+
private static $characters = array('=', '+', '-', '@');
33+
2634
/**
2735
* Method to convert logs objects array to a Generator for use with a CSV export
2836
*
@@ -46,6 +54,8 @@ public static function getCsvAsGenerator($data)
4654
);
4755
}
4856

57+
$disabledText = Text::_('COM_ACTIONLOGS_DISABLED');
58+
4959
// Header row
5060
yield array('Id', 'Message', 'Date', 'Extension', 'User', 'Ip');
5161

@@ -57,12 +67,36 @@ public static function getCsvAsGenerator($data)
5767

5868
yield array(
5969
'id' => $log->id,
60-
'message' => strip_tags(ActionlogsHelper::getHumanReadableLogMessage($log, false)),
70+
'message' => self::escapeCsvFormula(strip_tags(ActionlogsHelper::getHumanReadableLogMessage($log, false))),
6171
'date' => (new Date($log->log_date, new DateTimeZone('UTC')))->format('Y-m-d H:i:s T'),
62-
'extension' => Text::_($extension),
63-
'name' => $log->name,
64-
'ip_address' => Text::_($log->ip_address),
72+
'extension' => self::escapeCsvFormula(Text::_($extension)),
73+
'name' => self::escapeCsvFormula($log->name),
74+
'ip_address' => self::escapeCsvFormula($log->ip_address === 'COM_ACTIONLOGS_DISABLED' ? $disabledText : $log->ip_address)
6575
);
6676
}
6777
}
78+
79+
/**
80+
* Escapes potential characters that start a formula in a CSV value to prevent injection attacks
81+
*
82+
* @param mixed $value csv field value
83+
*
84+
* @return mixed
85+
*
86+
* @since 3.9.7
87+
*/
88+
protected static function escapeCsvFormula($value)
89+
{
90+
if ($value == '')
91+
{
92+
return $value;
93+
}
94+
95+
if (in_array($value[0], self::$characters, true))
96+
{
97+
$value = ' ' . $value;
98+
}
99+
100+
return $value;
101+
}
68102
}

administrator/components/com_admin/models/forms/profile.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,6 @@
143143
<option value="">JOPTION_USE_DEFAULT</option>
144144
</field>
145145

146-
<field
147-
name="helpsite"
148-
type="helpsite"
149-
label="COM_ADMIN_USER_FIELD_HELPSITE_LABEL"
150-
description="COM_ADMIN_USER_FIELD_HELPSITE_DESC"
151-
>
152-
<option value="">JOPTION_USE_DEFAULT</option>
153-
</field>
154-
155146
<field
156147
name="timezone"
157148
type="timezone"

administrator/components/com_admin/script.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,7 +1968,10 @@ public function deleteUnexistingFiles()
19681968
/*
19691969
* Joomla! 3.8.0 thru 3.9.0
19701970
*/
1971+
'/administrator/components/com_users/controllers/profile.json.php',
19711972
'/administrator/includes/toolbar.php',
1973+
'/components/com_users/controllers/profile_base_json.php',
1974+
'/components/com_users/controllers/profile.json.php',
19721975
'/libraries/joomla/filesystem/file.php',
19731976
'/libraries/joomla/filesystem/folder.php',
19741977
'/libraries/joomla/filesystem/helper.php',
@@ -1984,6 +1987,15 @@ public function deleteUnexistingFiles()
19841987
'/libraries/src/Mail/language/phpmailer.lang-joomla.php',
19851988
'/plugins/captcha/recaptcha/recaptchalib.php',
19861989

1990+
/*
1991+
* Joomla! 3.9.0 thru 3.10.0
1992+
*/
1993+
'/SECURITY.md',
1994+
'/administrator/components/com_users/controllers/profile.json.php',
1995+
'/components/com_users/controllers/profile.json.php',
1996+
'/components/com_users/controllers/profile_base_json.php',
1997+
'/tests/unit/suites/libraries/cms/form/field/JFormFieldHelpsiteTest.php',
1998+
19871999
/*
19882000
* Legacy FOF
19892001
*/
@@ -2010,6 +2022,11 @@ public function deleteUnexistingFiles()
20102022
'/libraries/fof/view.html.php',
20112023
'/libraries/fof/view.json.php',
20122024
'/libraries/fof/view.php',
2025+
2026+
/*
2027+
* Joomla! 3.9.7
2028+
*/
2029+
'/administrator/components/com_joomlaupdate/access.xml',
20132030
);
20142031

20152032
// TODO There is an issue while deleting folders using the ftp mode
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Query removed, see https://github.com/joomla/joomla-cms/pull/25177
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
UPDATE #__users SET params = REPLACE(params, '",,"', '","');
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Query removed, see https://github.com/joomla/joomla-cms/pull/25177
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
UPDATE "#__users" SET "params" = REPLACE("params", '",,"', '","');
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Query removed, see https://github.com/joomla/joomla-cms/pull/25177

0 commit comments

Comments
 (0)