Skip to content

Commit

Permalink
refs #4565 do not allow logme for any super user
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteur committed Jan 26, 2014
1 parent 8f4e45e commit 56bddb5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lang/en.json
Expand Up @@ -1223,7 +1223,7 @@
"PasswordChanged": "Your password has been changed.",
"ContactAdmin": "Possible reason: your host may have disabled the mail() function. <br \/>Please contact your Piwik administrator.",
"ExceptionPasswordMD5HashExpected": "The password parameter is expected to be a MD5 hash of the password.",
"ExceptionInvalidConfigSuperUserAuthenticationMethod": "The Super User defined in the config cannot be authenticated using the '%s' mechanism.",
"ExceptionInvalidSuperUserAccessAuthenticationMethod": "A user with Super User access cannot be authenticated using the '%s' mechanism.",
"ResetPasswordInstructions": "Enter a new password for your account."
},
"Mobile": {
Expand Down
4 changes: 2 additions & 2 deletions plugins/Login/Controller.php
Expand Up @@ -138,8 +138,8 @@ function logme()
}

$login = Common::getRequestVar('login', null, 'string');
if ($login == Piwik::getConfigSuperUserLogin()) {
throw new Exception(Piwik::translate('Login_ExceptionInvalidConfigSuperUserAuthenticationMethod', array("logme")));
if (Piwik::hasTheUserSuperUserAccess($login)) {
throw new Exception(Piwik::translate('Login_ExceptionInvalidSuperUserAccessAuthenticationMethod', array("logme")));
}

$currentUrl = 'index.php';
Expand Down

0 comments on commit 56bddb5

Please sign in to comment.