diff --git a/.drone.yml b/.drone.yml index 4637febd36704..41889d3c84726 100644 --- a/.drone.yml +++ b/.drone.yml @@ -219,7 +219,7 @@ steps: environment: CYPRESS_VERIFY_TIMEOUT: 100000 commands: - - mv cypress.config.dist.js cypress.config.js + - mv cypress.config.dist.mjs cypress.config.mjs - npx cypress install - npx cypress verify @@ -311,21 +311,29 @@ steps: environment: WEB_SERVER: from_secret: webserver - FTP_SERVER: - from_secret: ftpserver - FTP_USERNAME: - from_secret: ftpusername - FTP_PASSWORD: - from_secret: ftppassword + FTP_KEY: + from_secret: ftp_key + FTP_USER: + from_secret: ftp_user + FTP_HOST: + from_secret: ftp_host + ARTIFACTS_ROOT: + from_secret: artifacts_root GITHUB_TOKEN: from_secret: github_token commands: - - export PLUGIN_DEST_DIR=/artifacts/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER - - echo https://$WEB_SERVER$PLUGIN_DEST_DIR - - rclone config create artifacts ftp host $FTP_SERVER user $FTP_USERNAME port 21 pass $FTP_PASSWORD - - rclone mkdir artifacts:$PLUGIN_DEST_DIR - - rclone copy tests/System/output/ artifacts:$PLUGIN_DEST_DIR - - 'curl -X POST "https://api.github.com/repos/$DRONE_REPO/statuses/$DRONE_COMMIT" -H "Content-Type: application/json" -H "Authorization: token $GITHUB_TOKEN" -d "{\"state\":\"failure\", \"context\": \"Artifacts from Failure\", \"description\": \"You can find artifacts from the failure of the build here:\", \"target_url\": \"https://$WEB_SERVER$PLUGIN_DEST_DIR\"}" > /dev/null' + - export PLUGIN_DEST_DIR=$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER + - echo https://$WEB_SERVER/drone/$PLUGIN_DEST_DIR + - mkdir -p ~/.ssh + - eval $(ssh-agent -s) + - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config + - echo "$FTP_KEY" > ~/.ssh/id_rsa + - chmod 600 ~/.ssh/id_rsa + - ssh-add + - rclone config create artifacts sftp host $FTP_HOST user $FTP_USER port 22 + - rclone mkdir artifacts:$ARTIFACTS_ROOT/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER + - rclone copy tests/System/output/ artifacts:$ARTIFACTS_ROOT/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER + - 'curl -X POST "https://api.github.com/repos/$DRONE_REPO/statuses/$DRONE_COMMIT" -H "Content-Type: application/json" -H "Authorization: token $GITHUB_TOKEN" -d "{\"state\":\"failure\", \"context\": \"Artifacts from Failure\", \"description\": \"You can find artifacts from the failure of the build here:\", \"target_url\": \"https://$WEB_SERVER/drone/$PLUGIN_DEST_DIR\"}" > /dev/null' when: status: - failure @@ -354,7 +362,7 @@ services: MYSQL_DATABASE: test_joomla - name: mysql8 - image: mysql:8 + image: mysql:8.0 command: ["--default-authentication-plugin=mysql_native_password"] environment: MYSQL_USER: joomla_ut @@ -496,6 +504,6 @@ trigger: --- kind: signature -hmac: ca3d5f3a6e39270f147f8f02ca4bc4cca7050f7ab2bcaf0258426e0089cfef5b +hmac: ccc71c7a0c6643aef1000b49a0125d4a9bf2bacedc3875c9106b31449e7f50f8 ... diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 751a1ce63d1a2..d659b92ed8779 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -12,9 +12,9 @@ build/bump.php @rdeutz build/deleted_file_check.php @rdeutz # Core/Extension Install/Update Tools -administrator/components/com_joomlaupdate/* @rdeutz @zero-24 -libraries/src/Installer/* @rdeutz @zero-24 -libraries/src/Updater/* @rdeutz @zero-24 +administrator/components/com_joomlaupdate/* @rdeutz +libraries/src/Installer/* @rdeutz +libraries/src/Updater/* @rdeutz # Automated Testing tests/* @hackwar @fancyFranci @@ -24,9 +24,6 @@ tests/Unit/* @rdeutz @fancyFranci phpunit.xml.dist @rdeutz @hackwar @fancyFranci phpunit-pgsql.xml.dist @rdeutz @hackwar @fancyFranci -# HttpHeaders Plugin -plugins/system/httpheaders/* @zero-24 - # Workflow administrator/components/com_workflow/* @bembelimen @hleithner administrator/language/en-GB/com_workflow.ini @bembelimen @hleithner diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 50b6393e5c76d..eb65c17eb65ff 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -7,19 +7,22 @@ You are welcome to submit a contribution for review and possible inclusion in th 2) Follow the [Joomla! Coding Standards](https://developer.joomla.org/coding-standards.html). 3) When filing an issue or opening a PR, please include a clear title and description. The title should be a short summary of an issue and, if possible, should include a reference to an open issue. For example, `Invalid Query in com_admin (Ref #1234)` would be sufficient. All issues and PRs should include a description with as much detail as possible. -If it is a PR, include what the issue is, what the PR is addressing, testing instructions and environmental information (PHP version, database driver and version, and other data you can retrieve from your site's system information view) in case the issue is specific to certain environments. If additional information is needed, please be prepared to provide it as our community members review your submission. + If it is a PR, include what the issue is, what the PR is addressing, testing instructions and environmental information (PHP version, database driver and version, and other data you can retrieve from your site's system information view) in case the issue is specific to certain environments. If additional information is needed, please be prepared to provide it as our community members review your submission. 4) Report security issues to the Joomla! Security Strike Team (JSST) at security@joomla.org or use the [JSST contact form](https://developer.joomla.org/contact-security-team.html). Please do not use the public tracker for security issues. +5) If you have a feature request, then please open a discussion to define the feature request and discuss possible solutions. Discussions can be converted into issues when the request is defined sufficiently that a developer can start coding the feature. In this process you will get feedback from the maintainers, if the feature is something for the Joomla core distribution or not. + Please be patient as not all items will be tested immediately (remember, all bug testing for the Joomla! CMS is done by volunteers) and be receptive to feedback about your code. #### Branches -PRs should usually be made to the `4.3-dev` branch as this contains the most recent version of the code. -There are other branches available which serve specific purposes. +While 4.4 is in maintenance mode, ie we are still fixing bugs, PRs should be made to the `4.4-dev` branch. Merged bugfixes will be upmerged into the current 5.x branch. If a bug is only in the 5.x series the PR should be made to the current 5.x branch (currently 5.1). + | Branch | Purpose | | ------ | ------- | -| 3.10-dev | Branch for the Joomla 3.x series. The 3.10 series release will now only include security patches. | -| 4.3-dev | Branch for the current minor Joomla version.| -| 4.4-dev | Branch for the next minor Joomla version. Commits to 4.3-dev will be applied to this branch as well. | -| 5.0-dev | Branch for the next major Joomla version. New features go into this branch. | +| 4.4-dev | Branch for the current 4.x Joomla version. Currently in maintenance mode | +| 5.1-dev | Branch for the current 5.x Joomla version. Bugfix only for 5.x go into this branch. | +| 5.2-dev | Branch for the next minor 5.x Joomla version. New features go into this branch. | +| 6.0-dev | Branch for the next major Joomla version. New features that include a b/c break have to go into this branch. | + diff --git a/.gitignore b/.gitignore index 6772a69665f3b..b936fdbaa9b6e 100644 --- a/.gitignore +++ b/.gitignore @@ -103,7 +103,7 @@ RoboFile.ini !/tests/System/output/screenshots/.gitkeep /tests/System/output/videos !/tests/System/output/videos/.gitkeep -cypress.config.js +cypress.config.mjs # WebAuthn FIDO metadata cache /plugins/system/webauthn/fido.jwt diff --git a/administrator/components/com_actionlogs/src/Controller/DisplayController.php b/administrator/components/com_actionlogs/src/Controller/DisplayController.php index 7493052e2de1c..999dde7fe4aae 100644 --- a/administrator/components/com_actionlogs/src/Controller/DisplayController.php +++ b/administrator/components/com_actionlogs/src/Controller/DisplayController.php @@ -17,7 +17,7 @@ // phpcs:enable PSR1.Files.SideEffects /** - * Plugins display controller. + * Actionlogs display controller. * * @since 4.0.0 */ diff --git a/administrator/components/com_actionlogs/src/Helper/ActionlogsHelper.php b/administrator/components/com_actionlogs/src/Helper/ActionlogsHelper.php index 77692636e8396..f41dd24089cff 100644 --- a/administrator/components/com_actionlogs/src/Helper/ActionlogsHelper.php +++ b/administrator/components/com_actionlogs/src/Helper/ActionlogsHelper.php @@ -177,10 +177,10 @@ public static function getLogContentTypeParams($context) */ public static function getHumanReadableLogMessage($log, $generateLinks = true) { + static::loadActionLogPluginsLanguage(); static $links = []; - - $message = Text::_($log->message_language_key); - $messageData = json_decode($log->message, true); + $message = Text::_($log->message_language_key); + $messageData = json_decode($log->message, true); // Special handling for translation extension name if (isset($messageData['extension_name'])) { diff --git a/administrator/components/com_admin/postinstall/htaccessbrotli.php b/administrator/components/com_admin/postinstall/htaccessbrotli.php new file mode 100644 index 0000000000000..bc6383f63813b --- /dev/null +++ b/administrator/components/com_admin/postinstall/htaccessbrotli.php @@ -0,0 +1,30 @@ + + * @license GNU General Public License version 2 or later; see LICENSE.txt + * + * This file contains post-installation message handling for notifying users of a change + * in the default .htaccess file regarding setting the Content-Encoding header. + */ + +// phpcs:disable PSR1.Files.SideEffects +\defined('_JEXEC') or die; +// phpcs:enable PSR1.Files.SideEffects + +/** + * Notifies users of a change in the default .htaccess file regarding setting for brotli to prevent double compression + * + * This check returns true regardless of condition. + * + * @return boolean + * + * @since 4.4.4 + */ +function admin_postinstall_htaccessbrotli_condition() +{ + return true; +} diff --git a/administrator/components/com_admin/sql/updates/mysql/4.4.4-2024-03-28.sql b/administrator/components/com_admin/sql/updates/mysql/4.4.4-2024-03-28.sql new file mode 100644 index 0000000000000..0d1ce76be7c38 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.4.4-2024-03-28.sql @@ -0,0 +1,5 @@ +-- +-- Add post-installation message about setting the Content-Encoding header in .htaccess +-- +INSERT IGNORE INTO `#__postinstall_messages` (`extension_id`, `title_key`, `description_key`, `action_key`, `language_extension`, `language_client_id`, `type`, `action_file`, `action`, `condition_file`, `condition_method`, `version_introduced`, `enabled`) +SELECT `extension_id`, 'COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_TITLE', 'COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_DESCRIPTION', '', 'com_admin', 1, 'message', '', '', 'admin://components/com_admin/postinstall/htaccessbrotli.php', 'admin_postinstall_htaccessbrotli_condition', '4.4.4', 1 FROM `#__extensions` WHERE `name` = 'files_joomla'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.4.4-2024-03-28.sql b/administrator/components/com_admin/sql/updates/postgresql/4.4.4-2024-03-28.sql new file mode 100644 index 0000000000000..b59b29a4a2813 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.4.4-2024-03-28.sql @@ -0,0 +1,6 @@ +-- +-- Add post-installation message about setting the Content-Encoding header in .htaccess +-- +INSERT INTO "#__postinstall_messages" ("extension_id", "title_key", "description_key", "action_key", "language_extension", "language_client_id", "type", "action_file", "action", "condition_file", "condition_method", "version_introduced", "enabled") +SELECT "extension_id", 'COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_TITLE', 'COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_DESCRIPTION', '', 'com_admin', 1, 'message', '', '', 'admin://components/com_admin/postinstall/htaccessbrotli.php', 'admin_postinstall_htaccessbrotli_condition', '4.4.4', 1 FROM "#__extensions" WHERE "name" = 'files_joomla' + ON CONFLICT DO NOTHING; diff --git a/administrator/components/com_associations/src/Helper/AssociationsHelper.php b/administrator/components/com_associations/src/Helper/AssociationsHelper.php index 5fd7523383e18..3ca4d55a2d1af 100644 --- a/administrator/components/com_associations/src/Helper/AssociationsHelper.php +++ b/administrator/components/com_associations/src/Helper/AssociationsHelper.php @@ -72,7 +72,7 @@ public static function getAssociationList($extensionName, $typeName, $itemId) } /** - * Get the the instance of the extension helper class + * Get the instance of the extension helper class * * @param string $extensionName The extension name with com_ * diff --git a/administrator/components/com_content/src/Event/Model/FeatureEvent.php b/administrator/components/com_content/src/Event/Model/FeatureEvent.php index 0891354cc9b6d..602d3c2d8db7d 100644 --- a/administrator/components/com_content/src/Event/Model/FeatureEvent.php +++ b/administrator/components/com_content/src/Event/Model/FeatureEvent.php @@ -71,9 +71,9 @@ public function __construct($name, array $arguments = []) } /** - * Set used parameter to true + * Set abort and reason parameters. * - * @param bool $value The value to set + * @param string $reason Abort reason * * @return void * diff --git a/administrator/components/com_cpanel/tmpl/cpanel/default.php b/administrator/components/com_cpanel/tmpl/cpanel/default.php index d3601723f5c18..950c176a4b2b5 100644 --- a/administrator/components/com_cpanel/tmpl/cpanel/default.php +++ b/administrator/components/com_cpanel/tmpl/cpanel/default.php @@ -61,7 +61,7 @@ echo ModuleHelper::renderModule($module, ['style' => 'well']); } ?> - authorise('core.create', 'com_modules')) : ?> + authorise('core.admin', 'com_modules') && $user->authorise('core.create', 'com_modules')) : ?>