From fa55b6065c3b8f17a409ef35b5a83cbcf2c38db8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyril=20Rez=C3=A9?= Date: Fri, 30 Jan 2026 02:59:21 +0100 Subject: [PATCH 1/4] Set default userAgent if nothing else is set, as it is in Joomla CMS http package. Set default userAgent if nothing else is set, as it is in Joomla CMS http package. The change introduces in https://github.com/joomla/joomla-cms/pull/45751 to replace CMS Http package by the framework package with the PSR-7 interface has some difference. The missing part to set userAgent as default if nothing else set will return a 403 error when trying to update an extension, if the update xml file is hosted on a server using a firewall. This missing part (difference with CMS http package) in Joomla 6.0+ blocked updates for one of my update server xml hosted on OVH where their firewall was enabled. Disabling the hosting server firewall was the only way to make the update process works. The userAgent check was introduced in this PR: https://github.com/joomla/joomla-cms/pull/16538 --- src/HttpFactory.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/HttpFactory.php b/src/HttpFactory.php index 6e81cb83..f3dae254 100644 --- a/src/HttpFactory.php +++ b/src/HttpFactory.php @@ -36,6 +36,13 @@ public function getHttp($options = [], $adapters = null) ); } + // Set default userAgent if nothing else is set + if (!isset($options['userAgent'])) { + $version = new Version(); + $options['userAgent'] = $version->getUserAgent('Joomla', true, false); + } + + if (!$driver = $this->getAvailableDriver($options, $adapters)) { throw new \RuntimeException('No transport driver available.'); } From a19d4160d9b825d6ee0a524128bb40ecf9a614cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyril=20Rez=C3=A9?= Date: Fri, 30 Jan 2026 04:06:15 +0100 Subject: [PATCH 2/4] Update default userAgent to a static string --- src/HttpFactory.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/HttpFactory.php b/src/HttpFactory.php index f3dae254..32f9be57 100644 --- a/src/HttpFactory.php +++ b/src/HttpFactory.php @@ -38,8 +38,7 @@ public function getHttp($options = [], $adapters = null) // Set default userAgent if nothing else is set if (!isset($options['userAgent'])) { - $version = new Version(); - $options['userAgent'] = $version->getUserAgent('Joomla', true, false); + $options['userAgent'] = 'Mozilla/5.0 Joomla!'; } From aba4813d7a406467d7e323bf08ee48cffa6f1c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyril=20Rez=C3=A9?= Date: Fri, 30 Jan 2026 04:22:41 +0100 Subject: [PATCH 3/4] Update default userAgent in HttpFactory --- src/HttpFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HttpFactory.php b/src/HttpFactory.php index 32f9be57..85b88a82 100644 --- a/src/HttpFactory.php +++ b/src/HttpFactory.php @@ -38,7 +38,7 @@ public function getHttp($options = [], $adapters = null) // Set default userAgent if nothing else is set if (!isset($options['userAgent'])) { - $options['userAgent'] = 'Mozilla/5.0 Joomla!'; + $options['userAgent'] = 'Mozilla/5.0 Joomla!/Framework'; } From 0d810516369f6e86622ff1f71cf000c46e7118cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyril=20Rez=C3=A9?= Date: Fri, 30 Jan 2026 04:28:38 +0100 Subject: [PATCH 4/4] Remove unnecessary blank line in HttpFactory.php --- src/HttpFactory.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/HttpFactory.php b/src/HttpFactory.php index 85b88a82..b5ccb726 100644 --- a/src/HttpFactory.php +++ b/src/HttpFactory.php @@ -41,7 +41,6 @@ public function getHttp($options = [], $adapters = null) $options['userAgent'] = 'Mozilla/5.0 Joomla!/Framework'; } - if (!$driver = $this->getAvailableDriver($options, $adapters)) { throw new \RuntimeException('No transport driver available.'); }