Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2021-12-15 13:38:56 +0300
committerGitHub <noreply@github.com>2021-12-15 13:38:56 +0300
commit80065825c356316978dda26d917f3f31a24c92e3 (patch)
tree9c850a2bce1e17349d0fc7903ebc993341bb5377 /plugins/TwoFactorAuth
parent2ef991afa23dd722fc32fd907c81e99cb264bfe1 (diff)
Ensure 2FA is not loaded when safemode is triggered (#18501)
Diffstat (limited to 'plugins/TwoFactorAuth')
-rw-r--r--plugins/TwoFactorAuth/TwoFactorAuth.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/TwoFactorAuth/TwoFactorAuth.php b/plugins/TwoFactorAuth/TwoFactorAuth.php
index 8305c45411..0b28bc6ef8 100644
--- a/plugins/TwoFactorAuth/TwoFactorAuth.php
+++ b/plugins/TwoFactorAuth/TwoFactorAuth.php
@@ -172,6 +172,10 @@ class TwoFactorAuth extends \Piwik\Plugin
return false;
}
+ if ($module === 'CorePluginsAdmin' && strtolower($action) === 'safemode') {
+ return false;
+ }
+
if ($module === 'CoreUpdater' && $action !== 'newVersionAvailable' && $action !== 'oneClickUpdate') {
return false;
}