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-06-17 21:34:33 +0300
committerGitHub <noreply@github.com>2021-06-17 21:34:33 +0300
commita35e6c981ea14f83260ebeb7bf09e74a1b7825ee (patch)
tree4fce6255fc552dedc9807081042e7df5c356aaea /plugins/Login
parent0c3859707dcee9f20e708e7f362a396e375a5186 (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.php9
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;
}