diff options
author | Stefan Giehl <stefan@matomo.org> | 2021-06-17 21:34:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-17 21:34:33 +0300 |
commit | a35e6c981ea14f83260ebeb7bf09e74a1b7825ee (patch) | |
tree | 4fce6255fc552dedc9807081042e7df5c356aaea /plugins/Login | |
parent | 0c3859707dcee9f20e708e7f362a396e375a5186 (diff) |
Ensure login is correctly detected for brute force detection when using logme feature (#17677)
* Ensure login is correctly detected for brute force detection when using logme feature
* simplify code
Diffstat (limited to 'plugins/Login')
-rw-r--r-- | plugins/Login/Login.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/Login/Login.php b/plugins/Login/Login.php index 9c21e8ee8c..8b0c299350 100644 --- a/plugins/Login/Login.php +++ b/plugins/Login/Login.php @@ -219,11 +219,14 @@ class Login extends \Piwik\Plugin private function getUsernameUsedInPasswordLogin() { $login = StaticContainer::get(\Piwik\Auth::class)->getLogin(); - if (empty($login) - || $login == 'anonymous' - ) { + if (empty($login) || $login == 'anonymous') { $login = Common::getRequestVar('form_login', false); + $action = Common::getRequestVar('action', false); + if ($action == 'logme') { + $login = Common::getRequestVar('login', $login); + } } + return $login; } |