From aed408cbb6549479b97126e345b173030d2ae530 Mon Sep 17 00:00:00 2001 From: Trazom62 Date: Wed, 20 Jan 2010 19:57:58 +0100 Subject: Fix .account password command that failed when username not in upppercase in DB --HG-- branch : trunk --- src/game/AccountMgr.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/game/AccountMgr.cpp b/src/game/AccountMgr.cpp index 350c96edc43..4b186725451 100644 --- a/src/game/AccountMgr.cpp +++ b/src/game/AccountMgr.cpp @@ -142,6 +142,7 @@ AccountOpResult AccountMgr::ChangePassword(uint32 accid, std::string new_passwd) if (utf8length(new_passwd) > MAX_ACCOUNT_STR) return AOR_PASS_TOO_LONG; + normalizeString(username); normalizeString(new_passwd); // also reset s and v to force update at next realmd login @@ -213,6 +214,7 @@ bool AccountMgr::CheckPassword(uint32 accid, std::string passwd) if(!GetName(accid, username)) return false; + normalizeString(username); normalizeString(passwd); QueryResult *result = loginDatabase.PQuery("SELECT 1 FROM account WHERE id='%d' AND sha_pass_hash='%s'", accid, CalculateShaPassHash(username, passwd).c_str()); -- cgit v1.2.3