diff options
author | Peter Zhang <peter@innocraft.com> | 2022-01-12 04:23:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-12 04:23:20 +0300 |
commit | cfc3b46382b3e792f29958d4186864be2c4cdfa3 (patch) | |
tree | 38605244c92aca30c79010ad15c906e75d375588 /core | |
parent | 3e4bfc21f0f6ccef6bc84410dffdf98eb4fb067b (diff) |
move unsupported Browser check before create session (#18575)
* Update FrontController.php
move unsupported Browser before create session
* Update core/FrontController.php
Co-authored-by: Stefan Giehl <stefan@matomo.org>
* Update FrontControllerTest.php
fix tests
Co-authored-by: Stefan Giehl <stefan@matomo.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/FrontController.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/FrontController.php b/core/FrontController.php index 448abb5b75..7ac273c089 100644 --- a/core/FrontController.php +++ b/core/FrontController.php @@ -396,6 +396,11 @@ class FrontController extends Singleton $loggedIn = false; + //move this up unsupported Browser do not create session + if ($this->isSupportedBrowserCheckNeeded()) { + SupportedBrowser::checkIfBrowserSupported(); + } + // don't use sessionauth in cli mode // try authenticating w/ session first... $sessionAuth = $this->makeSessionAuthenticator(); @@ -423,9 +428,7 @@ class FrontController extends Singleton $this->makeAuthenticator($sessionAuth); // Piwik\Auth must be set to the correct Login plugin } - if ($this->isSupportedBrowserCheckNeeded()) { - SupportedBrowser::checkIfBrowserSupported(); - } + // Force the auth to use the token_auth if specified, so that embed dashboard // and all other non widgetized controller methods works fine |