Do a raw http request on an URL that gets redirected, like / on a multi-language site:
$ openssl s_client -connect some-website.com:443
GET / HTTP/1.1[enter]
Host: some-website.com[enter]
[enter]
No error
PHP Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /htdocs/libraries/vendor/joomla/application/src/Web/WebClient.php on line 380 (and other lines)
php8.3-fpm 8.3.6-1+020240424.32+debian121.gbp9a7ce5
I don't know which client actually does http request without user agent, but I see these errors in the logs quite often.
Anyway, we should always validate user-supplied variables.
An easy fix should be:
htdocs/libraries/vendor/joomla/application/src/Web/WebClient.php
[...]
public const NONE = 0; // maybe UNKOWN instead?
[...]
protected function detectEngine($userAgent)
{
if(empty(trim($userAgent))) {
$this->engine = self::NONE;
} elseif [...]
}
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
please test joomla-framework/application#124
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-05-02 10:41:30 |
Closed_By | ⇒ | alikon |
Sorry, I was mislead by the "Library" option in the categories selection. I didn't appear to me that "Joomla! Issue Tracker - CMS" excludes the Joomla library (although I am certainly aware of the difference between the CMS and the framework).
As your fix is in
libraries/vendor/joomla/application
then it should be reported/fixed there and not in the cmshttps://github.com/joomla-framework/application
Can be closed as not a bug in the cms but in the upstream library