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:
-rw-r--r--plugins/Login/Controller.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/Login/Controller.php b/plugins/Login/Controller.php
index 6b6919a784..5faff40844 100644
--- a/plugins/Login/Controller.php
+++ b/plugins/Login/Controller.php
@@ -193,6 +193,11 @@ class Piwik_Login_Controller extends Piwik_Controller
*/
protected function lostPasswordFormValidated($loginMail)
{
+ if( $user === 'anonymous' )
+ {
+ return Piwik_Translate('Login_InvalidUsernameEmail');
+ }
+
$user = self::getUserInformation($loginMail);
if( $user === null )
{
@@ -374,7 +379,7 @@ class Piwik_Login_Controller extends Piwik_Controller
}
$expiry = strftime('%Y%m%d%H', $timestamp);
- $token = md5($expiry . $user['login'] . $user['email'] . $user['password']);
+ $token = md5(Piwik_Common::getSalt() . md5($expiry . $user['login'] . $user['email'] . $user['password']));
return $token;
}