Skip to content

Commit bc42ae7

Browse files
committed
Merge remote-tracking branch 'upstream/4.2-dev' into 4.2-dev-move-deleted-files-and-folders-outside-script-2022-06
2 parents d8e064b + 1b01462 commit bc42ae7

File tree

55 files changed

+144
-104
lines changed

Some content is hidden

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

55 files changed

+144
-104
lines changed

administrator/components/com_admin/src/View/Sysinfo/HtmlView.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
use Exception;
1414
use Joomla\CMS\Access\Exception\NotAllowed;
15-
use Joomla\CMS\Factory;
1615
use Joomla\CMS\Language\Text;
1716
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
1817
use Joomla\CMS\Router\Route;

administrator/components/com_languages/src/View/Overrides/HtmlView.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
namespace Joomla\Component\Languages\Administrator\View\Overrides;
1212

13-
use Joomla\CMS\Factory;
1413
use Joomla\CMS\Helper\ContentHelper;
1514
use Joomla\CMS\Language\Text;
1615
use Joomla\CMS\MVC\View\GenericDataException;

administrator/components/com_templates/src/Helper/TemplateHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public static function canUpload($file, $err = '')
133133
}
134134
}
135135

136-
// Max upload size set to 2 MB for Template Manager
136+
// Max upload size set to 10 MB for Template Manager
137137
$maxSize = (int) ($params->get('upload_limit') * 1024 * 1024);
138138

139139
if ($maxSize > 0 && (int) $file['size'] > $maxSize) {

administrator/components/com_templates/src/View/Template/HtmlView.php

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Joomla\CMS\Factory;
1515
use Joomla\CMS\Filter\InputFilter;
1616
use Joomla\CMS\Form\Form;
17+
use Joomla\CMS\HTML\HTMLHelper;
1718
use Joomla\CMS\Language\Text;
1819
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
1920
use Joomla\CMS\Object\CMSObject;
@@ -295,7 +296,28 @@ protected function addToolbar()
295296
}
296297

297298
if (count($this->updatedList) !== 0 && $this->pluginState) {
298-
ToolbarHelper::custom('template.deleteOverrideHistory', 'times', '', 'COM_TEMPLATES_BUTTON_DELETE_LIST_ENTRY', true, 'updateForm');
299+
$dropdown = $bar->dropdownButton('override-group')
300+
->text('COM_TEMPLATES_BUTTON_CHECK')
301+
->toggleSplit(false)
302+
->icon('icon-ellipsis-h')
303+
->buttonClass('btn btn-action')
304+
->form('updateForm')
305+
->listCheck(true);
306+
307+
$childBar = $dropdown->getChildToolbar();
308+
309+
$childBar->publish('template.publish')
310+
->text('COM_TEMPLATES_BUTTON_CHECK_LIST_ENTRY')
311+
->form('updateForm')
312+
->listCheck(true);
313+
$childBar->unpublish('template.unpublish')
314+
->text('COM_TEMPLATES_BUTTON_UNCHECK_LIST_ENTRY')
315+
->form('updateForm')
316+
->listCheck(true);
317+
$childBar->unpublish('template.deleteOverrideHistory')
318+
->text('COM_TEMPLATES_BUTTON_DELETE_LIST_ENTRY')
319+
->form('updateForm')
320+
->listCheck(true);
299321
}
300322

301323
if ($this->type === 'home') {

administrator/components/com_templates/tmpl/template/default_updated_files.php

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,24 @@
1515
use Joomla\CMS\Language\Text;
1616
use Joomla\CMS\Router\Route;
1717

18+
HTMLHelper::_('bootstrap.dropdown', '.dropdown-toggle');
19+
1820
$input = Factory::getApplication()->input;
1921
?>
2022

21-
<form action="<?php echo Route::_('index.php?option=com_templates&view=template&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post" name="updateForm" id="updateForm">
22-
<div class="row mt-2">
23-
<div class="col-md-12">
24-
<?php if (count($this->updatedList) !== 0) : ?>
23+
<?php if (count($this->updatedList) === 0) : ?>
24+
<div class="alert alert-success">
25+
<span class="icon-check-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('NOTICE'); ?></span>
26+
<?php echo Text::_('COM_TEMPLATES_OVERRIDE_UPTODATE'); ?>
27+
</div>
28+
<?php else : ?>
29+
<div class="alert alert-info">
30+
<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
31+
<?php echo Text::_('COM_TEMPLATES_OVERRIDE_NOT_UPTODATE'); ?>
32+
</div>
33+
<form action="<?php echo Route::_('index.php?option=com_templates&view=template&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post" name="updateForm" id="updateForm">
34+
<div class="row mt-2">
35+
<div class="col-md-12">
2536
<table class="table">
2637
<thead>
2738
<tr>
@@ -78,12 +89,7 @@
7889
<input type="hidden" name="task" value="">
7990
<input type="hidden" name="boxchecked" value="0">
8091
<?php echo HTMLHelper::_('form.token'); ?>
81-
<?php else : ?>
82-
<div class="alert alert-success">
83-
<span class="icon-check-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('NOTICE'); ?></span>
84-
<?php echo Text::_('COM_TEMPLATES_OVERRIDE_UPTODATE'); ?>
85-
</div>
86-
<?php endif; ?>
92+
</div>
8793
</div>
88-
</div>
89-
</form>
94+
</form>
95+
<?php endif; ?>

administrator/components/com_templates/tmpl/templates/default.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@
118118
<?php if ($this->pluginState) : ?>
119119
<td class="d-none d-md-table-cell text-center">
120120
<?php if (!empty($item->updated)) : ?>
121-
<span class="badge bg-warning text-dark"><?php echo Text::plural('COM_TEMPLATES_N_CONFLICT', $item->updated); ?></span>
121+
<a href="<?php echo Route::_('index.php?option=com_templates&view=template&id=' . (int) $item->extension_id . '#files'); ?>">
122+
<span class="badge bg-warning text-dark"><?php echo Text::plural('COM_TEMPLATES_N_CONFLICT', $item->updated); ?></span>
123+
</a>
122124
<?php else : ?>
123125
<span class="badge bg-success"><?php echo Text::_('COM_TEMPLATES_UPTODATE'); ?></span>
124126
<?php endif; ?>

administrator/components/com_users/forms/group.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
type="groupparent"
2222
label="COM_USERS_GROUP_FIELD_PARENT_LABEL"
2323
validate="options"
24-
/>
24+
>
25+
<option value="0" disabled="disabled">COM_USERS_GROUP_FIELD_PARENT_SELECT</option>
26+
</field>
2527

2628
<field
2729
name="actions"

administrator/components/com_users/tmpl/method/edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
$cancelURL = $this->escape(base64_decode($this->returnURL));
2626
}
2727

28-
$recordId = (int)$this->record->id ?? 0;
28+
$recordId = (int) $this->record->id ?? 0;
2929
$method = $this->record->method ?? $this->getModel()->getState('method');
30-
$userId = (int)$this->user->id ?? 0;
30+
$userId = (int) $this->user->id ?? 0;
3131
$headingLevel = 2;
3232
$hideSubmit = !$this->renderOptions['show_submit'] && !$this->isEditExisting
3333
?>

administrator/language/en-GB/com_cpanel.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ COM_CPANEL_MESSAGES_BODY_NOCLOSE="There are important post-installation messages
1515
COM_CPANEL_MESSAGES_BODYMORE_NOCLOSE="This information area won't appear when you have hidden all the messages."
1616
COM_CPANEL_MESSAGES_REVIEW="Read Messages"
1717
COM_CPANEL_MESSAGES_TITLE="You have post-installation messages"
18-
COM_CPANEL_MSG_ADDNOSNIFF_BODY="<p>Joomla is now shipped with additional security hardenings in the default htaccess.txt and web.config.txt files. These hardenings disable the so called MIME-type sniffing feature in web browsers. The sniffing leads to specific attack vectors, where scripts in normally harmless file formats (eg images) will be executed, leading to Cross-Site-Scripting vulnerabilities.</p><p>The security team recommends to manually apply the necessary changes to existing .htaccess or web.config files, as those files can not be updated automatically.</p><p><strong>Changes for .htaccess</strong><br>Add the following lines before \"## Mod_rewrite in use.\":</p><pre>&lt;IfModule mod_headers.c&gt;\nHeader always set X-Content-Type-Options \"nosniff\"\n&lt;/IfModule&gt;</pre><p><strong>Changes for web.config</strong><br>Add the following lines right after \"&lt;/rewrite&gt;\":</p><pre>&lt;httpProtocol&gt;\n &lt;customHeaders&gt;\n &lt;add name=\"X-Content-Type-Options\" value=\"nosniff\" /&gt;\n &lt;/customHeaders&gt;\n&lt;/httpProtocol&gt;</pre>" ; Translators: Don't touch the code part in the message, Starting with ## Mod_rewrite ...
18+
COM_CPANEL_MSG_ADDNOSNIFF_BODY="<p>Joomla is now shipped with additional security hardenings in the default htaccess.txt and web.config.txt files. These hardenings disable the so called MIME-type sniffing feature in web browsers. The sniffing leads to specific attack vectors, where scripts in normally harmless file formats (eg images) will be executed, leading to Cross-Site-Scripting vulnerabilities.</p><p>The security team recommends to manually apply the necessary changes to existing .htaccess or web.config files, as those files can not be updated automatically.</p><p><strong>Changes for .htaccess</strong><br>Add the following lines before \"## Mod_rewrite in use.\":</p><pre>&lt;IfModule mod_headers.c&gt;\nHeader always set X-Content-Type-Options \"nosniff\"\n&lt;/IfModule&gt;</pre><p><strong>Changes for web.config</strong><br>Add the following lines right after \"&lt;/rewrite&gt;\":</p><pre>&lt;httpProtocol&gt;\n &lt;customHeaders&gt;\n &lt;add name=\"X-Content-Type-Options\" value=\"nosniff\" /&gt;\n &lt;/customHeaders&gt;\n&lt;/httpProtocol&gt;</pre>" ; Translators: Don't touch the code part in the message, Starting with ## Mod_rewrite &hellip;
1919
COM_CPANEL_MSG_ADDNOSNIFF_TITLE=".htaccess & web.config Security Update"
2020
COM_CPANEL_MSG_HTACCESSSVG_BODY="<p>Since 3.9.21 Joomla is shipped with an additional security rule in the default htaccess.txt. This rule will protect users of svg files from potential Cross-Site-Scripting (XSS) vulnerabilities.<br>The security team recommends to manually apply the necessary changes to any existing .htaccess file, as this file can not be updated automatically.</p><p><strong>Changes for .htaccess</strong></p><pre>&lt;FilesMatch \"\.svg$\"&gt;\n &lt;IfModule mod_headers.c&gt;\n Header always set Content-Security-Policy \"script-src 'none'\"\n &lt;/IfModule&gt;\n&lt;/FilesMatch&gt;</pre><p>Currently we are not aware of a method to conditionally configure this on IIS web servers, please contact your hosting provider for further assistance.</p>"
2121
COM_CPANEL_MSG_HTACCESSSVG_TITLE="Additional XSS protection for the usage of SVG files"

administrator/language/en-GB/com_joomlaupdate.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ COM_JOOMLAUPDATE_VIEW_DEFAULT_DESCRIPTION_BREAK="Extensions marked with <span cl
9393
COM_JOOMLAUPDATE_VIEW_DEFAULT_DESCRIPTION_MISSING_TAG="Extensions marked with <span class='badge bg-secondary'>Missing Compatibility Tag</span> indicate the developer has not included <a href='https://docs.joomla.org/Special:MyLanguage/Deploying_an_Update_Server' target='_blank' rel='noopener noreferrer'>compatibility information.</a>"
9494
COM_JOOMLAUPDATE_VIEW_DEFAULT_DESCRIPTION_UPDATE_REQUIRED="Extensions marked with <span class='badge bg-warning text-dark'>Yes (X.X.X)</span> might require an update."
9595
COM_JOOMLAUPDATE_VIEW_DEFAULT_DIRECTIVE="Directive"
96-
COM_JOOMLAUPDATE_VIEW_DEFAULT_DOWNLOAD_IN_PROGRESS="Downloading update file. Please wait ..."
96+
COM_JOOMLAUPDATE_VIEW_DEFAULT_DOWNLOAD_IN_PROGRESS="Downloading update file. Please wait &hellip;"
9797
COM_JOOMLAUPDATE_VIEW_DEFAULT_EXPLANATION_AND_LINK_TO_DOCS="The pre-update check provides you with information about the readiness of your server, settings and installed extensions for the update.<br>You can find more information about this page and how to prepare for updating Joomla in the <a class='pre-update-docs' href='https://docs.joomla.org/Special:MyLanguage/Pre-Update_Check' target='_blank' rel='noopener noreferrer'>pre-update check documentation</a>."
9898
COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_COMPATIBLE="Compatible"
9999
COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_COMPATIBLE_WITH_JOOMLA_VERSION="%s Compatible"

0 commit comments

Comments
 (0)