diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php index 206a6ec7d56c5..2637acfe6eaf6 100644 --- a/administrator/components/com_admin/script.php +++ b/administrator/components/com_admin/script.php @@ -7802,6 +7802,8 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false) // From 4.2.0-beta2 to 4.2.0-beta3 '/plugins/system/webauthn/src/Helper', '/plugins/system/webauthn/src/Exception', + // From 4.2.0 to 4.2.1 + '/libraries/vendor/symfony/string/Resources/bin', ); $status['files_checked'] = $files; diff --git a/administrator/components/com_users/src/Controller/CaptiveController.php b/administrator/components/com_users/src/Controller/CaptiveController.php index 5808876df9c56..ff92c4837e747 100644 --- a/administrator/components/com_users/src/Controller/CaptiveController.php +++ b/administrator/components/com_users/src/Controller/CaptiveController.php @@ -12,9 +12,7 @@ use Exception; use Joomla\CMS\Application\CMSApplication; -use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Date\Date; -use Joomla\CMS\Event\GenericEvent; use Joomla\CMS\Event\MultiFactor\NotifyActionLog; use Joomla\CMS\Event\MultiFactor\Validate; use Joomla\CMS\Factory; @@ -27,7 +25,6 @@ use Joomla\Component\Users\Administrator\Model\BackupcodesModel; use Joomla\Component\Users\Administrator\Model\CaptiveModel; use Joomla\Input\Input; -use ReflectionObject; use RuntimeException; /** diff --git a/administrator/components/com_users/src/Controller/MethodController.php b/administrator/components/com_users/src/Controller/MethodController.php index 35c19d35fdd35..3f158052a6856 100644 --- a/administrator/components/com_users/src/Controller/MethodController.php +++ b/administrator/components/com_users/src/Controller/MethodController.php @@ -12,7 +12,6 @@ use Exception; use Joomla\CMS\Application\CMSApplication; -use Joomla\CMS\Event\GenericEvent; use Joomla\CMS\Event\MultiFactor\NotifyActionLog; use Joomla\CMS\Event\MultiFactor\SaveSetup; use Joomla\CMS\Factory; diff --git a/administrator/components/com_users/src/Controller/MethodsController.php b/administrator/components/com_users/src/Controller/MethodsController.php index 8812242640a62..ce60496129e61 100644 --- a/administrator/components/com_users/src/Controller/MethodsController.php +++ b/administrator/components/com_users/src/Controller/MethodsController.php @@ -12,8 +12,6 @@ use Exception; use Joomla\CMS\Application\CMSApplication; -use Joomla\CMS\Component\ComponentHelper; -use Joomla\CMS\Event\GenericEvent; use Joomla\CMS\Event\MultiFactor\NotifyActionLog; use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; @@ -25,7 +23,6 @@ use Joomla\Component\Users\Administrator\Helper\Mfa as MfaHelper; use Joomla\Component\Users\Administrator\Model\MethodsModel; use Joomla\Input\Input; -use ReflectionObject; use RuntimeException; /** diff --git a/administrator/components/com_users/src/DataShape/SetupRenderOptions.php b/administrator/components/com_users/src/DataShape/SetupRenderOptions.php index 3790cc62a33ff..bc8b923e8ea02 100644 --- a/administrator/components/com_users/src/DataShape/SetupRenderOptions.php +++ b/administrator/components/com_users/src/DataShape/SetupRenderOptions.php @@ -11,7 +11,6 @@ namespace Joomla\Component\Users\Administrator\DataShape; use InvalidArgumentException; -use Joomla\Database\ParameterType; /** * Data shape for Method Setup Render Options diff --git a/administrator/components/com_users/src/Helper/UsersHelper.php b/administrator/components/com_users/src/Helper/UsersHelper.php index 41e13cb51662d..a17f058ddf008 100644 --- a/administrator/components/com_users/src/Helper/UsersHelper.php +++ b/administrator/components/com_users/src/Helper/UsersHelper.php @@ -16,7 +16,6 @@ use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Object\CMSObject; -use Joomla\CMS\Plugin\PluginHelper; /** * Users component helper. diff --git a/administrator/components/com_users/src/Model/MethodModel.php b/administrator/components/com_users/src/Model/MethodModel.php index 32df3181299a8..2f87d095b5d25 100644 --- a/administrator/components/com_users/src/Model/MethodModel.php +++ b/administrator/components/com_users/src/Model/MethodModel.php @@ -11,16 +11,15 @@ namespace Joomla\Component\Users\Administrator\Model; use Exception; -use Joomla\CMS\Event\GenericEvent; use Joomla\CMS\Event\MultiFactor\GetSetup; -use Joomla\CMS\Language\Text; -use Joomla\Component\Users\Administrator\DataShape\SetupRenderOptions; -use Joomla\Component\Users\Administrator\Helper\Mfa as MfaHelper; -use Joomla\Component\Users\Administrator\Table\MfaTable; use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\CMS\User\User; use Joomla\CMS\User\UserFactoryInterface; +use Joomla\Component\Users\Administrator\DataShape\SetupRenderOptions; +use Joomla\Component\Users\Administrator\Helper\Mfa as MfaHelper; +use Joomla\Component\Users\Administrator\Table\MfaTable; /** * Multi-factor Authentication management model diff --git a/administrator/components/com_users/src/Model/UserModel.php b/administrator/components/com_users/src/Model/UserModel.php index 46eb36baea241..76ac686f48fb2 100644 --- a/administrator/components/com_users/src/Model/UserModel.php +++ b/administrator/components/com_users/src/Model/UserModel.php @@ -12,8 +12,6 @@ use Joomla\CMS\Access\Access; use Joomla\CMS\Component\ComponentHelper; -use Joomla\CMS\Crypt\Crypt; -use Joomla\CMS\Encrypt\Aes; use Joomla\CMS\Factory; use Joomla\CMS\Form\Form; use Joomla\CMS\Language\Multilanguage; diff --git a/administrator/components/com_users/src/Model/UsersModel.php b/administrator/components/com_users/src/Model/UsersModel.php index 1058b2dbe361a..51ef69fad7435 100644 --- a/administrator/components/com_users/src/Model/UsersModel.php +++ b/administrator/components/com_users/src/Model/UsersModel.php @@ -17,8 +17,6 @@ use Joomla\CMS\MVC\Factory\MVCFactoryInterface; use Joomla\CMS\MVC\Model\ListModel; use Joomla\CMS\Plugin\PluginHelper; -use Joomla\Component\Users\Administrator\DataShape\MethodDescriptor; -use Joomla\Component\Users\Administrator\Helper\Mfa; use Joomla\Database\DatabaseQuery; use Joomla\Database\ParameterType; use Joomla\Utilities\ArrayHelper; diff --git a/administrator/components/com_users/src/View/Captive/HtmlView.php b/administrator/components/com_users/src/View/Captive/HtmlView.php index a569c5b6ff346..790f67752895f 100644 --- a/administrator/components/com_users/src/View/Captive/HtmlView.php +++ b/administrator/components/com_users/src/View/Captive/HtmlView.php @@ -19,7 +19,6 @@ use Joomla\CMS\Plugin\PluginHelper; use Joomla\CMS\Toolbar\Button\BasicButton; use Joomla\CMS\Toolbar\Toolbar; -use Joomla\CMS\Toolbar\ToolbarFactoryInterface; use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\User\UserFactoryInterface; use Joomla\Component\Users\Administrator\Helper\Mfa as MfaHelper; diff --git a/administrator/components/com_users/src/View/Debuggroup/HtmlView.php b/administrator/components/com_users/src/View/Debuggroup/HtmlView.php index 6b4c2d8b43002..ca0f44cb79995 100644 --- a/administrator/components/com_users/src/View/Debuggroup/HtmlView.php +++ b/administrator/components/com_users/src/View/Debuggroup/HtmlView.php @@ -11,7 +11,6 @@ namespace Joomla\Component\Users\Administrator\View\Debuggroup; use Joomla\CMS\Access\Exception\NotAllowed; -use Joomla\CMS\Factory; use Joomla\CMS\Helper\ContentHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\View\GenericDataException; diff --git a/administrator/components/com_users/src/View/Debuguser/HtmlView.php b/administrator/components/com_users/src/View/Debuguser/HtmlView.php index aca918d8a6b5a..638c5a0243af4 100644 --- a/administrator/components/com_users/src/View/Debuguser/HtmlView.php +++ b/administrator/components/com_users/src/View/Debuguser/HtmlView.php @@ -11,7 +11,6 @@ namespace Joomla\Component\Users\Administrator\View\Debuguser; use Joomla\CMS\Access\Exception\NotAllowed; -use Joomla\CMS\Factory; use Joomla\CMS\Helper\ContentHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\View\GenericDataException; diff --git a/administrator/components/com_users/tmpl/captive/select.php b/administrator/components/com_users/tmpl/captive/select.php index 3ba42faccbde7..8f63b1127f398 100644 --- a/administrator/components/com_users/tmpl/captive/select.php +++ b/administrator/components/com_users/tmpl/captive/select.php @@ -11,10 +11,10 @@ // Prevent direct access defined('_JEXEC') or die; -use Joomla\Component\Users\Administrator\View\Captive\HtmlView; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; use Joomla\CMS\Uri\Uri; +use Joomla\Component\Users\Administrator\View\Captive\HtmlView; /** @var HtmlView $this */ diff --git a/administrator/components/com_users/tmpl/method/backupcodes.php b/administrator/components/com_users/tmpl/method/backupcodes.php index fc10954884cee..56cb30780d3dc 100644 --- a/administrator/components/com_users/tmpl/method/backupcodes.php +++ b/administrator/components/com_users/tmpl/method/backupcodes.php @@ -11,11 +11,11 @@ // Prevent direct access defined('_JEXEC') or die; -use Joomla\Component\Users\Administrator\View\Method\HtmlView; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; +use Joomla\Component\Users\Administrator\View\Method\HtmlView; /** @var HtmlView $this */ diff --git a/administrator/components/com_users/tmpl/user/edit.php b/administrator/components/com_users/tmpl/user/edit.php index d408bbb6906bf..826d04cd985c0 100644 --- a/administrator/components/com_users/tmpl/user/edit.php +++ b/administrator/components/com_users/tmpl/user/edit.php @@ -15,7 +15,6 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\LayoutHelper; use Joomla\CMS\Router\Route; -use Joomla\Component\Users\Administrator\Helper\UsersHelper; /** @var Joomla\Component\Users\Administrator\View\User\HtmlView $this */ diff --git a/administrator/components/com_users/tmpl/user/edit_groups.php b/administrator/components/com_users/tmpl/user/edit_groups.php index fa5d093f04713..2500469ec0418 100644 --- a/administrator/components/com_users/tmpl/user/edit_groups.php +++ b/administrator/components/com_users/tmpl/user/edit_groups.php @@ -12,5 +12,4 @@ use Joomla\CMS\HTML\HTMLHelper; -?> -groups, true); +echo HTMLHelper::_('access.usergroups', 'jform[groups]', $this->groups, true); diff --git a/administrator/language/en-GB/install.xml b/administrator/language/en-GB/install.xml index 8ba2b6a12b122..e5d0ab230cb7b 100644 --- a/administrator/language/en-GB/install.xml +++ b/administrator/language/en-GB/install.xml @@ -2,8 +2,8 @@ English (en-GB) en-GB - 4.2.0 - 2022-07 + 4.2.1 + 2022-08 Joomla! Project admin@joomla.org www.joomla.org diff --git a/administrator/language/en-GB/langmetadata.xml b/administrator/language/en-GB/langmetadata.xml index 827538d399cdd..6d5cc6c0c16ba 100644 --- a/administrator/language/en-GB/langmetadata.xml +++ b/administrator/language/en-GB/langmetadata.xml @@ -1,8 +1,8 @@ English (en-GB) - 4.2.0 - 2022-07 + 4.2.1 + 2022-08 Joomla! Project admin@joomla.org www.joomla.org diff --git a/administrator/language/en-GB/plg_multifactorauth_totp.ini b/administrator/language/en-GB/plg_multifactorauth_totp.ini index ac9c1c1be849d..55550adf44154 100644 --- a/administrator/language/en-GB/plg_multifactorauth_totp.ini +++ b/administrator/language/en-GB/plg_multifactorauth_totp.ini @@ -7,7 +7,7 @@ PLG_MULTIFACTORAUTH_TOTP="Multi-factor Authentication - Verification Code" PLG_MULTIFACTORAUTH_TOTP_CAPTIVE_PROMPT="Please open your authenticator application or password manager and copy the six digit code for this site in the text box below, then click on the Validate button. If this code has been automatically filled in for you just click on the Validate button." PLG_MULTIFACTORAUTH_TOTP_ERR_VALIDATIONFAILED="You did not enter a valid verification code. Please check your authenticator app setup, and make sure that the time and time zone on your device is set correctly." PLG_MULTIFACTORAUTH_TOTP_LBL_LABEL="Enter the six digit verification code" -PLG_MULTIFACTORAUTH_TOTP_LBL_SETUP_INSTRUCTIONS="Set up your verification code (also known as an “authenticator code”) using the information below. You can use an authenticator app (such Google Authenticator, Authy, LastPass Authenticator, etc), your favorite password manager (1Password, BitWarden, Keeper, KeePassXC, Strongbox, etc) or, in some cases, your browser." +PLG_MULTIFACTORAUTH_TOTP_LBL_SETUP_INSTRUCTIONS="Set up your verification code (also known as an “authenticator code”) using the information below. You can use an authenticator app (such Google Authenticator, Authy, LastPass Authenticator, etc), your favourite password manager (1Password, BitWarden, Keeper, KeePassXC, Strongbox, etc) or, in some cases, your browser." PLG_MULTIFACTORAUTH_TOTP_LBL_SETUP_PLACEHOLDER="Six Digit Code" PLG_MULTIFACTORAUTH_TOTP_LBL_SETUP_TABLE_HEADING="Authenticator app setup" PLG_MULTIFACTORAUTH_TOTP_LBL_SETUP_TABLE_KEY="Enter this key" diff --git a/administrator/manifests/files/joomla.xml b/administrator/manifests/files/joomla.xml index 0f40af873b27f..7e0e65149c2c9 100644 --- a/administrator/manifests/files/joomla.xml +++ b/administrator/manifests/files/joomla.xml @@ -6,8 +6,8 @@ www.joomla.org (C) 2019 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt - 4.2.0-rc2-dev - 2022-07 + 4.2.1-dev + 2022-08 FILES_JOOMLA_XML_DESCRIPTION administrator/components/com_admin/script.php diff --git a/administrator/manifests/packages/pkg_en-GB.xml b/administrator/manifests/packages/pkg_en-GB.xml index 9b3722595c975..f175549f29204 100644 --- a/administrator/manifests/packages/pkg_en-GB.xml +++ b/administrator/manifests/packages/pkg_en-GB.xml @@ -2,8 +2,8 @@ English (en-GB) Language Pack en-GB - 4.2.0.1 - 2022-07 + 4.2.1.1 + 2022-08 Joomla! Project admin@joomla.org www.joomla.org diff --git a/api/language/en-GB/install.xml b/api/language/en-GB/install.xml index 7635df3036824..6c0d6a53be95a 100644 --- a/api/language/en-GB/install.xml +++ b/api/language/en-GB/install.xml @@ -2,8 +2,8 @@ English (en-GB) en-GB - 4.2.0 - 2022-07 + 4.2.1 + 2022-08 Joomla! Project admin@joomla.org www.joomla.org diff --git a/api/language/en-GB/langmetadata.xml b/api/language/en-GB/langmetadata.xml index 3342b78ed9c98..c5119894f55f9 100644 --- a/api/language/en-GB/langmetadata.xml +++ b/api/language/en-GB/langmetadata.xml @@ -1,8 +1,8 @@ English (en-GB) - 4.2.0 - 2022-07 + 4.2.1 + 2022-08 Joomla! Project admin@joomla.org www.joomla.org diff --git a/build/build.php b/build/build.php index 3f2be7570a56e..090d71d19f6de 100644 --- a/build/build.php +++ b/build/build.php @@ -170,6 +170,7 @@ function clean_checkout(string $dir) system('rm -rf libraries/vendor/symfony/*/Resources/doc'); system('rm -rf libraries/vendor/symfony/*/Tests'); system('rm -rf libraries/vendor/symfony/console/Resources'); + system('rm -rf libraries/vendor/symfony/string/Resources/bin'); // tobscure/json-api system('rm -rf libraries/vendor/tobscure/json-api/tests'); diff --git a/build/media_source/com_joomlaupdate/js/default.es6.js b/build/media_source/com_joomlaupdate/js/default.es6.js index f8b54dfa634dd..144c29675647f 100644 --- a/build/media_source/com_joomlaupdate/js/default.es6.js +++ b/build/media_source/com_joomlaupdate/js/default.es6.js @@ -10,13 +10,14 @@ Joomla = window.Joomla || {}; Joomla.submitbuttonUpload = () => { const form = document.getElementById('uploadForm'); + const confirmBackup = document.getElementById('joomlaupdate-confirm-backup'); // do field validation if (form.install_package.value === '') { alert(Joomla.Text._('COM_INSTALLER_MSG_INSTALL_PLEASE_SELECT_A_PACKAGE'), true); } else if (form.install_package.files[0].size > form.max_upload_size.value) { alert(Joomla.Text._('COM_INSTALLER_MSG_WARNINGS_UPLOADFILETOOBIG'), true); - } else if (document.getElementById('joomlaupdate-confirm-backup').checked) { + } else if (confirmBackup && confirmBackup.checked) { form.submit(); } }; @@ -53,13 +54,15 @@ Joomla = window.Joomla || {}; const form = installButton ? installButton.closest('form') : null; const task = form ? form.querySelector('[name=task]', form) : null; if (uploadButton) { - uploadButton.disabled = !updateCheck.checked; uploadButton.addEventListener('click', Joomla.submitbuttonUpload); - updateCheck.addEventListener('change', () => { - uploadButton.disabled = !updateCheck.checked; - }); + uploadButton.disabled = updateCheck && !updateCheck.checked; + if (updateCheck) { + updateCheck.addEventListener('change', () => { + uploadButton.disabled = !updateCheck.checked; + }); + } } - if (confirmButton && !updateCheck.checked) { + if (confirmButton && updateCheck && !updateCheck.checked) { confirmButton.classList.add('disabled'); } if (confirmButton && updateCheck) { @@ -73,22 +76,24 @@ Joomla = window.Joomla || {}; } if (uploadField) { uploadField.addEventListener('change', Joomla.installpackageChange); - uploadField.addEventListener('change', () => { - const fileSize = uploadForm.install_package.files[0].size; - const allowedSize = uploadForm.max_upload_size.value; - if (fileSize <= allowedSize && updateCheck.disabled) { - updateCheck.disabled = !updateCheck.disabled; - } else if (fileSize <= allowedSize && !updateCheck.disabled && !updateCheck.checked) { - updateCheck.disabled = false; - } else if (fileSize <= allowedSize && updateCheck.checked) { - updateCheck.checked = updateCheck.classList.contains('d-none'); - uploadButton.disabled = true; - } else if (fileSize > allowedSize && !updateCheck.disabled) { - updateCheck.disabled = !updateCheck.disabled; - updateCheck.checked = updateCheck.classList.contains('d-none'); - uploadButton.disabled = true; - } - }); + if (updateCheck) { + uploadField.addEventListener('change', () => { + const fileSize = uploadForm.install_package.files[0].size; + const allowedSize = uploadForm.max_upload_size.value; + if (fileSize <= allowedSize && updateCheck.disabled) { + updateCheck.disabled = !updateCheck.disabled; + } else if (fileSize <= allowedSize && !updateCheck.disabled && !updateCheck.checked) { + updateCheck.disabled = false; + } else if (fileSize <= allowedSize && updateCheck.checked) { + updateCheck.checked = updateCheck.classList.contains('d-none'); + uploadButton.disabled = true; + } else if (fileSize > allowedSize && !updateCheck.disabled) { + updateCheck.disabled = !updateCheck.disabled; + updateCheck.checked = updateCheck.classList.contains('d-none'); + uploadButton.disabled = true; + } + }); + } } // Trigger (re-) install (including checkbox confirm if we update) if (installButton && installButton.getAttribute('href') === '#' && task) { diff --git a/components/com_finder/src/Helper/FinderHelper.php b/components/com_finder/src/Helper/FinderHelper.php index 8c896fba9111f..317e52c25814e 100644 --- a/components/com_finder/src/Helper/FinderHelper.php +++ b/components/com_finder/src/Helper/FinderHelper.php @@ -47,8 +47,8 @@ public static function logSearch(Query $searchquery, $resultCount = 0) $query = $db->getQuery(true); // Sanitise the term for the database - $temp = unserialize(serialize($searchquery)); - $temp->input = trim(strtolower($searchquery->input)); + $temp = new \stdClass(); + $temp->input = trim(strtolower((string) $searchquery->input)); $entry = new \stdClass(); $entry->searchterm = $temp->input; $entry->query = serialize($temp); diff --git a/components/com_users/src/Controller/UserController.php b/components/com_users/src/Controller/UserController.php index a0907027b28fa..806e10237799c 100644 --- a/components/com_users/src/Controller/UserController.php +++ b/components/com_users/src/Controller/UserController.php @@ -48,10 +48,11 @@ public function login() // Check for a simple menu item id if (is_numeric($data['return'])) { - $data['return'] = 'index.php?Itemid=' . $data['return']; + $itemId = (int) $data['return']; + $data['return'] = 'index.php?Itemid=' . $itemId; if (Multilanguage::isEnabled()) { - $language = $this->getModel('Login', 'Site')->getMenuLanguage($data['return']); + $language = $this->getModel('Login', 'Site')->getMenuLanguage($itemId); if ($language !== '*') { $data['return'] .= '&lang=' . $language; diff --git a/composer.json b/composer.json index bdfb6636d68d6..9cca3657d632e 100644 --- a/composer.json +++ b/composer.json @@ -96,7 +96,8 @@ "dragonmantank/cron-expression": "^3.1", "enshrined/svg-sanitize": "^0.15.4", "lcobucci/jwt": "^3.4.6", - "web-token/signature-pack": "^2.2.11" + "web-token/signature-pack": "^2.2.11", + "phpseclib/bcmath_compat": "^2.0" }, "require-dev": { "phpunit/phpunit": "^8.5", diff --git a/composer.lock b/composer.lock index ccddb2ec5d1c4..f78a73e51c452 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1227bf81f2ae3e339897c13e82916fd9", + "content-hash": "247b8d364f7a520d56a83ae603d724fd", "packages": [ { "name": "algo26-matthias/idna-convert", @@ -2644,6 +2644,73 @@ ], "time": "2022-02-02T18:37:57+00:00" }, + { + "name": "paragonie/constant_time_encoding", + "version": "v2.6.3", + "source": { + "type": "git", + "url": "https://github.com/paragonie/constant_time_encoding.git", + "reference": "58c3f47f650c94ec05a151692652a868995d2938" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938", + "reference": "58c3f47f650c94ec05a151692652a868995d2938", + "shasum": "" + }, + "require": { + "php": "^7|^8" + }, + "require-dev": { + "phpunit/phpunit": "^6|^7|^8|^9", + "vimeo/psalm": "^1|^2|^3|^4" + }, + "type": "library", + "autoload": { + "psr-4": { + "ParagonIE\\ConstantTime\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com", + "role": "Maintainer" + }, + { + "name": "Steve 'Sc00bz' Thomas", + "email": "steve@tobtu.com", + "homepage": "https://www.tobtu.com", + "role": "Original Developer" + } + ], + "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", + "keywords": [ + "base16", + "base32", + "base32_decode", + "base32_encode", + "base64", + "base64_decode", + "base64_encode", + "bin2hex", + "encoding", + "hex", + "hex2bin", + "rfc4648" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/constant_time_encoding/issues", + "source": "https://github.com/paragonie/constant_time_encoding" + }, + "time": "2022-06-14T06:56:20+00:00" + }, { "name": "paragonie/sodium_compat", "version": "v1.17.1", @@ -2862,6 +2929,177 @@ ], "time": "2022-02-28T15:31:21+00:00" }, + { + "name": "phpseclib/bcmath_compat", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpseclib/bcmath_compat.git", + "reference": "2ffea8bfe1702b4535a7b3c2649c4301968e9a3c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpseclib/bcmath_compat/zipball/2ffea8bfe1702b4535a7b3c2649c4301968e9a3c", + "reference": "2ffea8bfe1702b4535a7b3c2649c4301968e9a3c", + "shasum": "" + }, + "require": { + "phpseclib/phpseclib": "^3.0" + }, + "provide": { + "ext-bcmath": "8.1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|^5.7|^6.0|^9.4", + "squizlabs/php_codesniffer": "^3.0" + }, + "suggest": { + "ext-gmp": "Will enable faster math operations" + }, + "type": "library", + "autoload": { + "files": [ + "lib/bcmath.php" + ], + "psr-4": { + "bcmath_compat\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jim Wigginton", + "email": "terrafrost@php.net", + "homepage": "http://phpseclib.sourceforge.net" + } + ], + "description": "PHP 5.x-8.x polyfill for bcmath extension", + "keywords": [ + "BigInteger", + "bcmath", + "bigdecimal", + "math", + "polyfill" + ], + "support": { + "email": "terrafrost@php.net", + "issues": "https://github.com/phpseclib/bcmath_compat/issues", + "source": "https://github.com/phpseclib/bcmath_compat" + }, + "time": "2021-12-16T02:35:52+00:00" + }, + { + "name": "phpseclib/phpseclib", + "version": "3.0.14", + "source": { + "type": "git", + "url": "https://github.com/phpseclib/phpseclib.git", + "reference": "2f0b7af658cbea265cbb4a791d6c29a6613f98ef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/2f0b7af658cbea265cbb4a791d6c29a6613f98ef", + "reference": "2f0b7af658cbea265cbb4a791d6c29a6613f98ef", + "shasum": "" + }, + "require": { + "paragonie/constant_time_encoding": "^1|^2", + "paragonie/random_compat": "^1.4|^2.0|^9.99.99", + "php": ">=5.6.1" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "suggest": { + "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", + "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", + "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", + "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." + }, + "type": "library", + "autoload": { + "files": [ + "phpseclib/bootstrap.php" + ], + "psr-4": { + "phpseclib3\\": "phpseclib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jim Wigginton", + "email": "terrafrost@php.net", + "role": "Lead Developer" + }, + { + "name": "Patrick Monnerat", + "email": "pm@datasphere.ch", + "role": "Developer" + }, + { + "name": "Andreas Fischer", + "email": "bantu@phpbb.com", + "role": "Developer" + }, + { + "name": "Hans-Jürgen Petrich", + "email": "petrich@tronic-media.com", + "role": "Developer" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com", + "role": "Developer" + } + ], + "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", + "homepage": "http://phpseclib.sourceforge.net", + "keywords": [ + "BigInteger", + "aes", + "asn.1", + "asn1", + "blowfish", + "crypto", + "cryptography", + "encryption", + "rsa", + "security", + "sftp", + "signature", + "signing", + "ssh", + "twofish", + "x.509", + "x509" + ], + "support": { + "issues": "https://github.com/phpseclib/phpseclib/issues", + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.14" + }, + "funding": [ + { + "url": "https://github.com/terrafrost", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpseclib", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", + "type": "tidelift" + } + ], + "time": "2022-04-04T05:15:45+00:00" + }, { "name": "psr/container", "version": "1.1.1", @@ -8851,303 +9089,6 @@ }, "time": "2021-10-14T09:30:02+00:00" }, - { - "name": "phpcompatibility/php-compatibility", - "version": "9.3.5", - "source": { - "type": "git", - "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", - "reference": "9fb324479acf6f39452e0655d2429cc0d3914243" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9fb324479acf6f39452e0655d2429cc0d3914243", - "reference": "9fb324479acf6f39452e0655d2429cc0d3914243", - "shasum": "" - }, - "require": { - "php": ">=5.3", - "squizlabs/php_codesniffer": "^2.3 || ^3.0.2" - }, - "conflict": { - "squizlabs/php_codesniffer": "2.6.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0" - }, - "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.", - "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." - }, - "type": "phpcodesniffer-standard", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-or-later" - ], - "authors": [ - { - "name": "Wim Godden", - "homepage": "https://github.com/wimg", - "role": "lead" - }, - { - "name": "Juliette Reinders Folmer", - "homepage": "https://github.com/jrfnl", - "role": "lead" - }, - { - "name": "Contributors", - "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors" - } - ], - "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.", - "homepage": "http://techblog.wimgodden.be/tag/codesniffer/", - "keywords": [ - "compatibility", - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues", - "source": "https://github.com/PHPCompatibility/PHPCompatibility" - }, - "time": "2019-12-27T09:44:58+00:00" - }, - { - "name": "phpcompatibility/phpcompatibility-joomla", - "version": "2.1.2", - "source": { - "type": "git", - "url": "https://github.com/PHPCompatibility/PHPCompatibilityJoomla.git", - "reference": "9143bd858fe79991925d1fe50bc6dc13f4c282ba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityJoomla/zipball/9143bd858fe79991925d1fe50bc6dc13f4c282ba", - "reference": "9143bd858fe79991925d1fe50bc6dc13f4c282ba", - "shasum": "" - }, - "require": { - "phpcompatibility/php-compatibility": "^9.0", - "phpcompatibility/phpcompatibility-paragonie": "^1.0", - "phpcompatibility/phpcompatibility-symfony": "^1.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7" - }, - "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", - "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." - }, - "type": "phpcodesniffer-standard", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-or-later" - ], - "authors": [ - { - "name": "Wim Godden", - "role": "lead" - }, - { - "name": "Juliette Reinders Folmer", - "role": "lead" - }, - { - "name": "Michael Babker", - "role": "Joomla specialist" - } - ], - "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by Joomla.", - "homepage": "http://phpcompatibility.com/", - "keywords": [ - "compatibility", - "joomla", - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/PHPCompatibility/PHPCompatibilityJoomla/issues", - "source": "https://github.com/PHPCompatibility/PHPCompatibilityJoomla" - }, - "time": "2021-02-15T13:18:46+00:00" - }, - { - "name": "phpcompatibility/phpcompatibility-paragonie", - "version": "1.3.1", - "source": { - "type": "git", - "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git", - "reference": "ddabec839cc003651f2ce695c938686d1086cf43" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/ddabec839cc003651f2ce695c938686d1086cf43", - "reference": "ddabec839cc003651f2ce695c938686d1086cf43", - "shasum": "" - }, - "require": { - "phpcompatibility/php-compatibility": "^9.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7", - "paragonie/random_compat": "dev-master", - "paragonie/sodium_compat": "dev-master" - }, - "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", - "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." - }, - "type": "phpcodesniffer-standard", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-or-later" - ], - "authors": [ - { - "name": "Wim Godden", - "role": "lead" - }, - { - "name": "Juliette Reinders Folmer", - "role": "lead" - } - ], - "description": "A set of rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.", - "homepage": "http://phpcompatibility.com/", - "keywords": [ - "compatibility", - "paragonie", - "phpcs", - "polyfill", - "standards" - ], - "support": { - "issues": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/issues", - "source": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie" - }, - "time": "2021-02-15T10:24:51+00:00" - }, - { - "name": "phpcompatibility/phpcompatibility-passwordcompat", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/PHPCompatibility/PHPCompatibilityPasswordCompat.git", - "reference": "560e1b45f7ad5ba634ad37820da155ec49f8f272" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityPasswordCompat/zipball/560e1b45f7ad5ba634ad37820da155ec49f8f272", - "reference": "560e1b45f7ad5ba634ad37820da155ec49f8f272", - "shasum": "" - }, - "require": { - "phpcompatibility/php-compatibility": "^9.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7", - "ircmaxell/password-compat": "dev-master" - }, - "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", - "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." - }, - "type": "phpcodesniffer-standard", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-or-later" - ], - "authors": [ - { - "name": "Wim Godden", - "role": "lead" - }, - { - "name": "Juliette Reinders Folmer", - "role": "lead" - } - ], - "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by ircmaxell's password_compat library.", - "homepage": "http://phpcompatibility.com/", - "keywords": [ - "compatibility", - "password_compat", - "phpcs", - "polyfill", - "standards" - ], - "support": { - "issues": "https://github.com/PHPCompatibility/PHPCompatibilityPasswordCompat/issues", - "source": "https://github.com/PHPCompatibility/PHPCompatibilityPasswordCompat" - }, - "time": "2021-02-15T09:51:58+00:00" - }, - { - "name": "phpcompatibility/phpcompatibility-symfony", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/PHPCompatibility/PHPCompatibilitySymfony.git", - "reference": "36ca92b3cc547c08597bae06da23167449239b45" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilitySymfony/zipball/36ca92b3cc547c08597bae06da23167449239b45", - "reference": "36ca92b3cc547c08597bae06da23167449239b45", - "shasum": "" - }, - "require": { - "phpcompatibility/php-compatibility": "^9.0", - "phpcompatibility/phpcompatibility-paragonie": "^1.0", - "phpcompatibility/phpcompatibility-passwordcompat": "^1.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7", - "symfony/polyfill-php54": "1.19", - "symfony/polyfill-php55": "1.19", - "symfony/polyfill-php56": "1.19", - "symfony/polyfill-php70": "1.19", - "symfony/polyfill-php71": "1.19", - "symfony/polyfill-php72": "dev-main", - "symfony/polyfill-php73": "dev-main", - "symfony/polyfill-php74": "dev-main", - "symfony/polyfill-php80": "dev-main" - }, - "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", - "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." - }, - "type": "phpcodesniffer-standard", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-or-later" - ], - "authors": [ - { - "name": "Wim Godden", - "role": "lead" - }, - { - "name": "Juliette Reinders Folmer", - "role": "lead" - } - ], - "description": "A set of rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Symfony polyfill libraries.", - "homepage": "http://phpcompatibility.com/", - "keywords": [ - "compatibility", - "phpcs", - "polyfill", - "standards", - "symfony" - ], - "support": { - "issues": "https://github.com/PHPCompatibility/PHPCompatibilitySymfony/issues", - "source": "https://github.com/PHPCompatibility/PHPCompatibilitySymfony" - }, - "time": "2021-02-16T11:31:55+00:00" - }, { "name": "phpdocumentor/reflection-common", "version": "2.2.0", diff --git a/installation/language/en-GB/langmetadata.xml b/installation/language/en-GB/langmetadata.xml index 5e6a8f380f25f..88bad16715883 100644 --- a/installation/language/en-GB/langmetadata.xml +++ b/installation/language/en-GB/langmetadata.xml @@ -1,8 +1,8 @@ English (United Kingdom) - 4.2.0 - 2022-07 + 4.2.1 + 2022-08 Joomla! Project (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/language/en-GB/install.xml b/language/en-GB/install.xml index bf3b73374b271..158e75aa54202 100644 --- a/language/en-GB/install.xml +++ b/language/en-GB/install.xml @@ -2,8 +2,8 @@ English (en-GB) en-GB - 4.2.0 - 2022-07 + 4.2.1 + 2022-08 Joomla! Project admin@joomla.org www.joomla.org diff --git a/language/en-GB/langmetadata.xml b/language/en-GB/langmetadata.xml index a0f8ec5d4e8e0..c9aac9c669f8a 100644 --- a/language/en-GB/langmetadata.xml +++ b/language/en-GB/langmetadata.xml @@ -1,8 +1,8 @@ English (en-GB) - 4.2.0 - 2022-07 + 4.2.1 + 2022-08 Joomla! Project admin@joomla.org www.joomla.org diff --git a/libraries/src/Application/MultiFactorAuthenticationHandler.php b/libraries/src/Application/MultiFactorAuthenticationHandler.php index ea52c30a4318f..dbf2b11303d8b 100644 --- a/libraries/src/Application/MultiFactorAuthenticationHandler.php +++ b/libraries/src/Application/MultiFactorAuthenticationHandler.php @@ -293,14 +293,9 @@ private function needsMultiFactorAuthenticationRedirection(): bool return false; } - // Allow the statistics plugin to run - if ($isAdmin && $option === 'com_ajax' && $task === '') { - $group = strtolower($this->input->getCmd('group', '')); - $plugin = strtolower($this->input->getCmd('plugin', '')); - - if ($group === 'system' && $plugin === 'sendstats') { - return false; - } + // Ignore non HTML Requests + if ($this->input->getCmd('format', 'html') !== 'html') { + return false; } return true; diff --git a/libraries/src/MVC/Model/AdminModel.php b/libraries/src/MVC/Model/AdminModel.php index c0647ef171727..44feaaabbaf58 100644 --- a/libraries/src/MVC/Model/AdminModel.php +++ b/libraries/src/MVC/Model/AdminModel.php @@ -415,7 +415,7 @@ protected function batchCopy($value, $pks, $contexts) } $newIds = array(); - $db = $this->getDatabase(); + $db = $this->getDbo(); // Parent exists so let's proceed while (!empty($pks)) { @@ -840,7 +840,7 @@ public function delete(&$pks) // Multilanguage: if associated, delete the item in the _associations table if ($this->associationsContext && Associations::isEnabled()) { - $db = $this->getDatabase(); + $db = $this->getDbo(); $query = $db->getQuery(true) ->select( [ @@ -1305,7 +1305,7 @@ public function save($data) } // Get associationskey for edited item - $db = $this->getDatabase(); + $db = $this->getDbo(); $id = (int) $table->$key; $query = $db->getQuery(true) ->select($db->quoteName('key')) diff --git a/libraries/src/MVC/Model/BaseDatabaseModel.php b/libraries/src/MVC/Model/BaseDatabaseModel.php index 3dfbca2d674ad..9e0525046d70f 100644 --- a/libraries/src/MVC/Model/BaseDatabaseModel.php +++ b/libraries/src/MVC/Model/BaseDatabaseModel.php @@ -46,7 +46,8 @@ abstract class BaseDatabaseModel extends BaseModel implements DatabaseModelInterface, DispatcherAwareInterface, CurrentUserInterface, - CacheControllerFactoryAwareInterface + CacheControllerFactoryAwareInterface, + DatabaseAwareInterface { use DatabaseAwareTrait; use MVCFactoryAwareTrait; @@ -151,13 +152,13 @@ public function __construct($config = array(), MVCFactoryInterface $factory = nu protected function _getList($query, $limitstart = 0, $limit = 0) { if (\is_string($query)) { - $query = $this->getDatabase()->getQuery(true)->setQuery($query); + $query = $this->getDbo()->getQuery(true)->setQuery($query); } $query->setLimit($limit, $limitstart); - $this->getDatabase()->setQuery($query); + $this->getDbo()->setQuery($query); - return $this->getDatabase()->loadObjectList(); + return $this->getDbo()->loadObjectList(); } /** @@ -188,9 +189,9 @@ protected function _getListCount($query) $query = clone $query; $query->clear('select')->clear('order')->clear('limit')->clear('offset')->select('COUNT(*)'); - $this->getDatabase()->setQuery($query); + $this->getDbo()->setQuery($query); - return (int) $this->getDatabase()->loadResult(); + return (int) $this->getDbo()->loadResult(); } // Otherwise fall back to inefficient way of counting all results. @@ -201,10 +202,10 @@ protected function _getListCount($query) $query->clear('limit')->clear('offset')->clear('order'); } - $this->getDatabase()->setQuery($query); - $this->getDatabase()->execute(); + $this->getDbo()->setQuery($query); + $this->getDbo()->execute(); - return (int) $this->getDatabase()->getNumRows(); + return (int) $this->getDbo()->getNumRows(); } /** @@ -223,7 +224,7 @@ protected function _createTable($name, $prefix = 'Table', $config = array()) { // Make sure we are returning a DBO object if (!\array_key_exists('dbo', $config)) { - $config['dbo'] = $this->getDatabase(); + $config['dbo'] = $this->getDbo(); } return $this->getMVCFactory()->createTable($name, $prefix, $config); @@ -394,7 +395,7 @@ public function setDbo(DatabaseInterface $db = null) public function __get($name) { if ($name === '_db') { - return $this->getDatabase(); + return $this->getDbo(); } // Default the variable diff --git a/libraries/src/MVC/Model/ListModel.php b/libraries/src/MVC/Model/ListModel.php index 45c1fef87dc3c..516d32d2d9055 100644 --- a/libraries/src/MVC/Model/ListModel.php +++ b/libraries/src/MVC/Model/ListModel.php @@ -276,7 +276,7 @@ public function getItems() */ protected function getListQuery() { - return $this->getDatabase()->getQuery(true); + return $this->getDbo()->getQuery(true); } /** diff --git a/libraries/src/Version.php b/libraries/src/Version.php index a61c68f420783..3f7bd219988ff 100644 --- a/libraries/src/Version.php +++ b/libraries/src/Version.php @@ -51,7 +51,7 @@ final class Version * @var integer * @since 3.8.0 */ - public const PATCH_VERSION = 0; + public const PATCH_VERSION = 1; /** * Extra release version info. @@ -62,7 +62,7 @@ final class Version * @var string * @since 3.8.0 */ - public const EXTRA_VERSION = 'rc2-dev'; + public const EXTRA_VERSION = 'dev'; /** * Development status. @@ -86,7 +86,7 @@ final class Version * @var string * @since 3.5 */ - public const RELDATE = '19-July-2022'; + public const RELDATE = '16-August-2022'; /** * Release time. @@ -94,7 +94,7 @@ final class Version * @var string * @since 3.5 */ - public const RELTIME = '17:15'; + public const RELTIME = '13:10'; /** * Release timezone. @@ -306,8 +306,7 @@ private function getMediaVersionCache(): CacheController $cache = Factory::getContainer()->get(CacheControllerFactoryInterface::class) ->createCacheController('callback', ['defaultgroup' => '_media_version', 'caching' => true]); - // Media version cache never expire - $cache->setLifeTime(INF); + $cache->setLifeTime(315576000); // Disable cache when Debug is enabled if (JDEBUG) { diff --git a/modules/mod_breadcrumbs/src/Helper/BreadcrumbsHelper.php b/modules/mod_breadcrumbs/src/Helper/BreadcrumbsHelper.php index 026f7c8630c6a..ae982b5de33d0 100644 --- a/modules/mod_breadcrumbs/src/Helper/BreadcrumbsHelper.php +++ b/modules/mod_breadcrumbs/src/Helper/BreadcrumbsHelper.php @@ -63,7 +63,7 @@ public static function getList(Registry $params, CMSApplication $app) * * @return object * - * @since __DEPLOY_VERSION__ + * @since 4.2.0 */ public static function getHome(Registry $params, CMSApplication $app) { diff --git a/plugins/multifactorauth/fixed/src/Extension/Fixed.php b/plugins/multifactorauth/fixed/src/Extension/Fixed.php index a7fcd61b9710f..889fb6750b53a 100644 --- a/plugins/multifactorauth/fixed/src/Extension/Fixed.php +++ b/plugins/multifactorauth/fixed/src/Extension/Fixed.php @@ -27,7 +27,7 @@ use RuntimeException; /** - * TJoomla! Multi-factor Authentication using a fixed code. + * Joomla! Multi-factor Authentication using a fixed code. * * Requires a static string (password), different for each user. It effectively works as a second * password. The fixed code is stored hashed, like a regular password. diff --git a/plugins/multifactorauth/totp/src/Extension/Totp.php b/plugins/multifactorauth/totp/src/Extension/Totp.php index e2a3b2e912271..98260e2f186da 100644 --- a/plugins/multifactorauth/totp/src/Extension/Totp.php +++ b/plugins/multifactorauth/totp/src/Extension/Totp.php @@ -318,7 +318,7 @@ public function onUserMultifactorSaveSetup(SaveSetup $event): void public function onUserMultifactorValidate(Validate $event): void { /** - * @var MfaTable $record The MFA Method's record you're validatng against + * @var MfaTable $record The MFA Method's record you're validating against * @var User $user The user record * @var string $code The submitted code */ diff --git a/plugins/multifactorauth/webauthn/src/Extension/Webauthn.php b/plugins/multifactorauth/webauthn/src/Extension/Webauthn.php index 6bc8ed12a1d50..17619b01038fb 100644 --- a/plugins/multifactorauth/webauthn/src/Extension/Webauthn.php +++ b/plugins/multifactorauth/webauthn/src/Extension/Webauthn.php @@ -396,7 +396,7 @@ public function onUserMultifactorValidate(Validate $event): void } /** - * @var MfaTable $record The MFA Method's record you're validatng against + * @var MfaTable $record The MFA Method's record you're validating against * @var User $user The user record * @var string $code The submitted code */ diff --git a/plugins/multifactorauth/yubikey/src/Extension/Yubikey.php b/plugins/multifactorauth/yubikey/src/Extension/Yubikey.php index 394a2f6ea2adb..a6865521efc23 100644 --- a/plugins/multifactorauth/yubikey/src/Extension/Yubikey.php +++ b/plugins/multifactorauth/yubikey/src/Extension/Yubikey.php @@ -278,7 +278,7 @@ public function onUserMultifactorSaveSetup(SaveSetup $event): void public function onUserMultifactorValidate(Validate $event): void { /** - * @var MfaTable $record The MFA Method's record you're validatng against + * @var MfaTable $record The MFA Method's record you're validating against * @var User $user The user record * @var string $code The submitted code */ diff --git a/tests/Unit/Libraries/Cms/MVC/Model/DatabaseModelTest.php b/tests/Unit/Libraries/Cms/MVC/Model/DatabaseModelTest.php index 1e021cba0b999..f49482996978f 100644 --- a/tests/Unit/Libraries/Cms/MVC/Model/DatabaseModelTest.php +++ b/tests/Unit/Libraries/Cms/MVC/Model/DatabaseModelTest.php @@ -316,6 +316,48 @@ public function testCheckedOutWitFieldEmptyUserSet() $this->assertTrue($model->isCheckedOut((object)['checked_out' => 1])); } + /** + * @testdox that all function calls go over deprecated getDbo function + * + * @return void + * + * @since __DEPLOY_VERSION__ + * + * @deprecated 5.0 Must be removed when database calls are changed to getDatabase in libraries models + */ + public function testOverrideOldDboFunction() + { + $db = $this->createMock(DatabaseInterface::class); + $db->expects($this->never())->method('setQuery'); + + $query = $this->getQueryStub($db); + $newDb = $this->createMock(DatabaseInterface::class); + $newDb->expects($this->once())->method('setQuery')->with($this->equalTo($query)); + + $model = new class (['dbo' => $db], $this->createStub(MVCFactoryInterface::class), $newDb) extends BaseDatabaseModel + { + private $newDb; + + public function __construct(array $config, MVCFactoryInterface $factory, DatabaseInterface $newDb) + { + parent::__construct($config, $factory); + + $this->newDb = $newDb; + } + + public function _getList($query, $limitstart = 0, $limit = 0) + { + return parent::_getList($query, $limitstart, $limit); + } + + public function getDbo() + { + return $this->newDb; + } + }; + $model->_getList($query, 0, 1); + } + /** * @testdox still can use the old trait *