5.3 beta 1, unpublish the Backward Compatibility Plugin and open a page that does not exist
404 page is thrown
Class JRouterSite not found.
Setting a tainted URL for an article still call:
public static function getInstance($client, $options = [])
{
if (empty(self::$instances[$client])) {
// Create a Router object
$classname = 'JRouter' . ucfirst($client);
if (!class_exists($classname)) {
throw new \RuntimeException(Text::sprintf('JLIB_APPLICATION_ERROR_ROUTER_LOAD', $client), 500);
}
// Check for a possible service from the container otherwise manually instantiate the class
if (Factory::getContainer()->has($classname)) {
self::$instances[$client] = Factory::getContainer()->get($classname);
} else {
self::$instances[$client] = new $classname();
}
}
return self::$instances[$client];
}
The class JRouterSite is not found without the Backward Compatibility Plugin enabled, so an exception is thrown.
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
bug
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-02-24 13:32:12 |
Closed_By | ⇒ | richard67 |
Closing as having a pull request. Please test #44994 . Thanks in advance.
Hint: For testing with 5.3.0-beta1 the best is to apply the change manually with an editor, as the changed file is not identical with the one in 5.2 so line numbers have changed. But it's the same place within the getInstance method.
The issue has been reported for 5.3.0-beta1, but from reading code in file libraries/src/Router/Router.php, method getInstance, I would expect it to happen also on 5.2.x.