diff options
author | Stefan Giehl <stefan@matomo.org> | 2021-12-15 13:38:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-15 13:38:56 +0300 |
commit | 80065825c356316978dda26d917f3f31a24c92e3 (patch) | |
tree | 9c850a2bce1e17349d0fc7903ebc993341bb5377 /plugins/TwoFactorAuth | |
parent | 2ef991afa23dd722fc32fd907c81e99cb264bfe1 (diff) |
Ensure 2FA is not loaded when safemode is triggered (#18501)
Diffstat (limited to 'plugins/TwoFactorAuth')
-rw-r--r-- | plugins/TwoFactorAuth/TwoFactorAuth.php | 4 |
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; } |