PR-6.0-dev Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
9 Dec 2025

Pull Request for Issue #46295.

Summary of Changes

After migrating to the Framework HTTP package, some Joomla HTTP requests are sent without a User-Agent header, which can cause servers or firewalls to block them (e.g., during extension updates). This PR resolves the issue by ensuring Joomla’s default User-Agent is applied to these requests.

Testing Instructions

This PR makes change to different part of our code base, it will require carefully code review and approve from at least one maintainer

There are some important areas which needs to be tested:

Would be great if you can also test the behavior of the following plugins, but not required

  • Test GET Request scheduled task type (I personal tested it)
  • Test System - Joomla! Statistics plugin (I also tested it)
  • Test Multi-factor Authentication - YubiKey plugin. This one I never used or understand how it works, so I could not test it.

Actual result BEFORE applying this Pull Request

Some http requests sent from Joomla without User-Agent header

Expected result AFTER applying this Pull Request

All http requests sent from Joomla contains User-Agent header

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar joomdonation joomdonation - open - 9 Dec 2025
avatar joomdonation joomdonation - change - 9 Dec 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 9 Dec 2025
Category Administration com_installer com_joomlaupdate Libraries Front End Plugins
avatar joomdonation joomdonation - change - 9 Dec 2025
Labels Added: PR-6.0-dev
avatar joomdonation joomdonation - change - 10 Dec 2025
The description was changed
avatar joomdonation joomdonation - edited - 10 Dec 2025
avatar joomdonation
joomdonation - comment - 10 Dec 2025

@SniperSister There are some changes to TUF related code which I do not understand the internal yet. I'm unsure if test update Joomla use Custom update server cover it or not. Could you please help reviewing to make sure it is OK, thanks.

avatar AlterBrains
AlterBrains - comment - 10 Dec 2025

@joomdonation
Too much code duplication, it's better to keep using framework HTTP class but keep \Joomla\CMS\Http\HttpFactory which will auto-inject header by default (like in current 6.0.1)? CMS factory should be just rewritten a bit.
It's normal to use framework package but have CMS-specific factory which will resolve HTTP class with CMS-specific options.

avatar joomdonation
joomdonation - comment - 10 Dec 2025

@AlterBrains Thanks for your feedback and Yes, I agree with you that there is too much code duplication and that should be improved. However :

  • If we modify code of CMS http factory to return framework http object, I haven't checked but I expect there would be difference between http from framework with the one from CMS, so we will have the risk with b/c break
  • To be safe, I proposed to introduce a new method getHttpClient which return http object from framework, with default userAgent auto-injected. That would work. But @HLeithner suggested that we explode the idea of pushing http factor to container and then inject it automatically to model/controller when it is needed. That would take more time to implement, review and testing, so not suitable for a bug fix release

So think about this PR as a bugs fix to avoid these http requests being blocked by WAF as described in original issue due to missing user-agent. And then we will have to more to implement a proper solution in 6.1

avatar SniperSister
SniperSister - comment - 10 Dec 2025

There are some changes to TUF related code which I do not understand the internal yet. I'm unsure if test update Joomla use Custom update server cover it or not. Could you please help reviewing to make sure it is OK, thanks.

LGTM

Add a Comment

Login with GitHub to post a comment