From 0b09e4bfcb4cd7802eca86a031e4fc1ce85c6e3d Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Thu, 26 Feb 2015 00:45:17 +0100 Subject: [PATCH] Normalize username on AuthCrypt login Because users login with mixed casing and whatnot. --- plugins/AuthCrypt/AuthCryptPlugin.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/AuthCrypt/AuthCryptPlugin.php b/plugins/AuthCrypt/AuthCryptPlugin.php index 5e9d983507..c99a0a4e2a 100644 --- a/plugins/AuthCrypt/AuthCryptPlugin.php +++ b/plugins/AuthCrypt/AuthCryptPlugin.php @@ -44,6 +44,8 @@ class AuthCryptPlugin extends AuthenticationPlugin function checkPassword($username, $password) { + $username = Nickname::normalize($username); + $user = User::getKV('nickname', $username); if (!($user instanceof User)) { return false; @@ -81,6 +83,8 @@ class AuthCryptPlugin extends AuthenticationPlugin // $oldpassword is already verified when calling this function... shouldn't this be private?! function changePassword($username, $oldpassword, $newpassword) { + $username = Nickname::normalize($username); + if (!$this->password_changeable) { return false; } -- 2.39.5