diff --git a/.drone.yml b/.drone.yml index 9f197ff68a3..aa38aa92890 100644 --- a/.drone.yml +++ b/.drone.yml @@ -269,6 +269,6 @@ steps: --- kind: signature -hmac: 71729a12ae3556e03f924ac95c8a5cd14bb6a3c2d20ef6768fdd1e853397fd22 +hmac: d3d7b9b57f2aa7d6056ec0c37333fbaf81f42452fd7c5ffecdc9c6a9b130c120 ... diff --git a/administrator/components/com_actionlogs/src/Helper/ActionlogsHelper.php b/administrator/components/com_actionlogs/src/Helper/ActionlogsHelper.php index 23943baad70..411d9c267d4 100644 --- a/administrator/components/com_actionlogs/src/Helper/ActionlogsHelper.php +++ b/administrator/components/com_actionlogs/src/Helper/ActionlogsHelper.php @@ -237,12 +237,13 @@ public static function getHumanReadableLogMessage($log, $generateLinks = true) * @param string $contentType * @param integer $id * @param string $urlVar + * @param JObject $object * * @return string Link to the content item * * @since 3.9.0 */ - public static function getContentTypeLink($component, $contentType, $id, $urlVar = 'id') + public static function getContentTypeLink($component, $contentType, $id, $urlVar = 'id', $object = null) { // Try to find the component helper. $eName = str_replace('com_', '', $component); @@ -257,7 +258,7 @@ public static function getContentTypeLink($component, $contentType, $id, $urlVar if (class_exists($cName) && is_callable(array($cName, 'getContentTypeLink'))) { - return $cName::getContentTypeLink($contentType, $id); + return $cName::getContentTypeLink($contentType, $id, $object); } } diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php index 2fd5ac07e8c..8d54c44f5a5 100644 --- a/administrator/components/com_admin/script.php +++ b/administrator/components/com_admin/script.php @@ -560,7 +560,7 @@ protected function updateManifestCaches() * Delete files that should not exist * * @param bool $dryRun If set to true, will not actually delete files, but just report their status for use in CLI - * @param bool $suppressOutput Set to true to supress echoing any errors, and just return the $status array + * @param bool $suppressOutput Set to true to suppress echoing any errors, and just return the $status array * * @return array */ @@ -1460,7 +1460,6 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false) '/administrator/components/com_media/controllers/file.json.php', '/administrator/components/com_media/controllers/file.php', '/administrator/components/com_media/controllers/folder.php', - '/administrator/components/com_media/helpers/media.php', '/administrator/components/com_media/layouts/toolbar/deletemedia.php', '/administrator/components/com_media/layouts/toolbar/newfolder.php', '/administrator/components/com_media/layouts/toolbar/uploadmedia.php', @@ -3874,9 +3873,11 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false) '/libraries/vendor/leafo/lessphp/lessify', '/libraries/vendor/leafo/lessphp/lessify.inc.php', '/libraries/vendor/leafo/lessphp/plessc', + '/libraries/vendor/paragonie/random_compat/LICENSE', '/libraries/vendor/paragonie/random_compat/lib/byte_safe_strings.php', '/libraries/vendor/paragonie/random_compat/lib/cast_to_int.php', '/libraries/vendor/paragonie/random_compat/lib/error_polyfill.php', + '/libraries/vendor/paragonie/random_compat/lib/random.php', '/libraries/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php', '/libraries/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php', '/libraries/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php', @@ -5423,6 +5424,8 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false) '/libraries/vendor/ozdemirburak/iris/src/Traits/HsTrait.php', '/libraries/vendor/ozdemirburak/iris/src/Traits/HslTrait.php', '/libraries/vendor/ozdemirburak/iris/src/Traits/RgbTrait.php', + '/libraries/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey', + '/libraries/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc', '/libraries/vendor/psr/http-factory/.pullapprove.yml', '/libraries/vendor/spomky-labs/cbor-php/.php_cs.dist', '/libraries/vendor/spomky-labs/cbor-php/CODE_OF_CONDUCT.md', @@ -5843,6 +5846,19 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false) '/templates/cassiopeia/scss/tools/mixins/_margin.scss', '/templates/cassiopeia/scss/tools/mixins/_visually-hidden.scss', '/templates/system/js/error-locales.js', + // 4.0 from RC 1 to RC 2 + '/administrator/components/com_fields/tmpl/field/modal.php', + '/administrator/templates/atum/scss/pages/_com_admin.scss', + '/administrator/templates/atum/scss/pages/_com_finder.scss', + '/administrator/templates/atum/scss/pages/_com_joomlaupdate.scss', + '/libraries/src/Error/JsonApi/InstallLanguageExceptionHandler.php', + '/libraries/src/MVC/Controller/Exception/InstallLanguage.php', + '/media/com_fields/js/admin-field-edit-modal-es5.js', + '/media/com_fields/js/admin-field-edit-modal-es5.min.js', + '/media/com_fields/js/admin-field-edit-modal-es5.min.js.gz', + '/media/com_fields/js/admin-field-edit-modal.js', + '/media/com_fields/js/admin-field-edit-modal.min.js', + '/media/com_fields/js/admin-field-edit-modal.min.js.gz', ); $folders = array( @@ -6167,6 +6183,7 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false) '/libraries/vendor/simplepie/simplepie', '/libraries/vendor/simplepie', '/libraries/vendor/phpmailer/phpmailer/extras', + '/libraries/vendor/paragonie/random_compat/lib', '/libraries/vendor/leafo/lessphp', '/libraries/vendor/leafo', '/libraries/vendor/joomla/session/Joomla/Session/Storage', @@ -6797,7 +6814,6 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false) '/administrator/components/com_media/views/images', '/administrator/components/com_media/views', '/administrator/components/com_media/models', - '/administrator/components/com_media/helpers', '/administrator/components/com_media/controllers', '/administrator/components/com_login/views/login/tmpl', '/administrator/components/com_login/views/login', @@ -7051,6 +7067,8 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false) '/media/vendor/punycode/js', '/media/templates/atum/js', '/media/templates/atum', + '/libraries/vendor/paragonie/random_compat/dist', + '/libraries/vendor/paragonie/random_compat', '/libraries/vendor/ozdemirburak/iris/src/Traits', '/libraries/vendor/ozdemirburak/iris/src/Helpers', '/libraries/vendor/ozdemirburak/iris/src/Exceptions', diff --git a/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion.sql b/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion.sql index b8e951bc1ab..91b4b94b289 100644 --- a/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion.sql +++ b/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion.sql @@ -1,5 +1,5 @@ -- --- Step 1: Convert all tables to utf8mb4 chracter set with utf8mb4_unicode_ci collation +-- Step 1: Convert all tables to utf8mb4 character set with utf8mb4_unicode_ci collation -- except of #__finder_xxx tables, those are handled with 4.0.0-2018-07-29.sql at update. -- diff --git a/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion_optional.sql b/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion_optional.sql index 794d604bae1..a3b8fd00881 100644 --- a/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion_optional.sql +++ b/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion_optional.sql @@ -7,7 +7,7 @@ -- -- --- Step 1: Convert all tables to utf8mb4 chracter set with utf8mb4_unicode_ci collation. +-- Step 1: Convert all tables to utf8mb4 character set with utf8mb4_unicode_ci collation. -- ALTER TABLE `#__core_log_searches` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2021-06-04.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2021-06-04.sql new file mode 100644 index 00000000000..8988cad5e66 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2021-06-04.sql @@ -0,0 +1,8 @@ +-- after 4.0.0 RC1 +UPDATE `#__template_styles` + SET `title` = 'Atum - Default' + WHERE `title` = 'atum - Default'; + +UPDATE `#__template_styles` + SET `title` = 'Cassiopeia - Default' + WHERE `title` = 'cassiopeia - Default'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2021-06-04.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2021-06-04.sql new file mode 100644 index 00000000000..305b3255742 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2021-06-04.sql @@ -0,0 +1,8 @@ +-- after 4.0.0 RC1 +UPDATE "#__template_styles" + SET "title" = 'Atum - Default' + WHERE "title" = 'atum - Default'; + +UPDATE "#__template_styles" + SET "title" = 'Cassiopeia - Default' + WHERE "title" = 'cassiopeia - Default'; diff --git a/administrator/components/com_admin/src/Controller/DisplayController.php b/administrator/components/com_admin/src/Controller/DisplayController.php index 242b8d86ce1..3857024e52e 100644 --- a/administrator/components/com_admin/src/Controller/DisplayController.php +++ b/administrator/components/com_admin/src/Controller/DisplayController.php @@ -20,5 +20,28 @@ */ class DisplayController extends BaseController { + /** + * View method + * + * @param boolean $cachable If true, the view output will be cached + * @param array $urlparams An array of safe URL parameters and their variable types, for valid values see {@link \JFilterInput::clean()}. + * + * @return static Supports chaining. + * + * @since 3.9 + */ + public function display($cachable = false, $urlparams = array()) + { + $viewName = $this->input->get('view', $this->default_view); + $format = $this->input->get('format', 'html'); + // Check CSRF token for sysinfo export views + if ($viewName === 'sysinfo' && ($format === 'text' || $format === 'json')) + { + // Check for request forgeries. + $this->checkToken('GET'); + } + + return parent::display($cachable, $urlparams); + } } diff --git a/administrator/components/com_admin/src/View/Sysinfo/HtmlView.php b/administrator/components/com_admin/src/View/Sysinfo/HtmlView.php index 380e0352335..a3b8c6325fe 100644 --- a/administrator/components/com_admin/src/View/Sysinfo/HtmlView.php +++ b/administrator/components/com_admin/src/View/Sysinfo/HtmlView.php @@ -17,6 +17,7 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView; use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\Component\Admin\Administrator\Model\SysinfoModel; @@ -110,12 +111,12 @@ protected function addToolbar(): void { ToolbarHelper::title(Text::_('COM_ADMIN_SYSTEM_INFORMATION'), 'info-circle systeminfo'); ToolbarHelper::link( - Route::_('index.php?option=com_admin&view=sysinfo&format=text'), + Route::_('index.php?option=com_admin&view=sysinfo&format=text&' . Session::getFormToken() . '=1'), 'COM_ADMIN_DOWNLOAD_SYSTEM_INFORMATION_TEXT', 'download' ); ToolbarHelper::link( - Route::_('index.php?option=com_admin&view=sysinfo&format=json'), + Route::_('index.php?option=com_admin&view=sysinfo&format=json&' . Session::getFormToken() . '=1'), 'COM_ADMIN_DOWNLOAD_SYSTEM_INFORMATION_JSON', 'download' ); diff --git a/administrator/components/com_admin/tmpl/help/default.php b/administrator/components/com_admin/tmpl/help/default.php index acdfc81117c..20b033590a0 100644 --- a/administrator/components/com_admin/tmpl/help/default.php +++ b/administrator/components/com_admin/tmpl/help/default.php @@ -30,13 +30,13 @@