You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]
Expected result
No error
Actual result
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)
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 [...]
}
The text was updated successfully, but these errors were encountered:
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).
Steps to reproduce the issue
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]
Expected result
No error
Actual result
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)
System information
php8.3-fpm 8.3.6-1+0
20240424.32+debian121.gbp9a7ce5Additional comments
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 [...]
}
The text was updated successfully, but these errors were encountered: