Language Change PR-5.1-dev Pending

User tests: Successful: Unsuccessful:

avatar SniperSister
SniperSister
15 May 2024

Pull Request for Issue #43328

Summary of Changes

This PR adds a generic catch block that catches exceptions thrown in the TUF library. So far, we only caught attack-specific exceptions, internal errors, or errors related to metadata syntax error remained uncaught, making the site unusable.

Furthermore, it catches non-tuf exceptions from the HTTP library in our transport and converts them into TUF exceptions to also get them caught in the fetcher library.

Testing Instructions

We have to simulate an exception in the library in order to verify that the patch works. To do so, find the following code block in libraries/src/TUF/TufFetcher.php:

try {
                // Refresh the data if needed, it will be written inside the DB, then we fetch it afterwards and return it to
                // the caller
                $updater->refresh();

                // Persist the data as it was correctly fetched and verified
                $storage->persist();

                return $storage->read('targets');
            } catch (\Exception $e) {

and replace it with

try {
               throw new Tuf\Exception\TufException("Test TUF exception");

                // Refresh the data if needed, it will be written inside the DB, then we fetch it afterwards and return it to
                // the caller
                $updater->refresh();

                // Persist the data as it was correctly fetched and verified
                $storage->persist();

                return $storage->read('targets');
            } catch (\Exception $e) {

Actual result BEFORE applying this Pull Request

Unhandled exception.

Expected result AFTER applying this Pull Request

Proper system message shown, system remains usable.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • [x ] No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • [x ] No documentation changes for manual.joomla.org needed

avatar SniperSister SniperSister - open - 15 May 2024
avatar SniperSister SniperSister - change - 15 May 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 May 2024
Category Administration Language & Strings Libraries
avatar SniperSister SniperSister - change - 15 May 2024
Labels Added: Language Change PR-5.1-dev
avatar SniperSister SniperSister - change - 16 May 2024
The description was changed
avatar SniperSister SniperSister - edited - 16 May 2024
avatar SniperSister
SniperSister - comment - 16 May 2024

For the record: a user from the german forum has tested the patch and it solved a http-transport related issue, see: https://forum.joomla.de/thread/20986-failed-to-connect-to-update-joomla-org-port-443/?postID=154136#post154136

avatar dautrich dautrich - test_item - 17 May 2024 - Tested successfully
avatar dautrich
dautrich - comment - 17 May 2024

I have tested this item ✅ successfully on fa179de


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43477.

avatar LadySolveig LadySolveig - change - 20 May 2024
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2024-05-20 12:13:50
Closed_By LadySolveig
avatar LadySolveig LadySolveig - close - 20 May 2024
avatar LadySolveig LadySolveig - merge - 20 May 2024
avatar LadySolveig
LadySolveig - comment - 20 May 2024

Thank you @SniperSister and also for testing and review @dautrich @brianteeman @Fedik

Add a Comment

Login with GitHub to post a comment