Fix typo. Pointed by Aokromes, thx :)
--HG-- branch : trunk
This commit is contained in:
@@ -40,8 +40,8 @@ AccountOpResult AccountMgr::CreateAccount(std::string username, std::string pass
|
||||
if(utf8length(username) > MAX_ACCOUNT_STR)
|
||||
return AOR_NAME_TOO_LONG; // username's too long
|
||||
|
||||
normilizeString(username);
|
||||
normilizeString(password);
|
||||
normalizeString(username);
|
||||
normalizeString(password);
|
||||
|
||||
LoginDatabase.escape_string(username);
|
||||
LoginDatabase.escape_string(password);
|
||||
@@ -120,8 +120,8 @@ AccountOpResult AccountMgr::ChangeUsername(uint32 accid, std::string new_uname,
|
||||
if(utf8length(new_passwd) > MAX_ACCOUNT_STR)
|
||||
return AOR_PASS_TOO_LONG;
|
||||
|
||||
normilizeString(new_uname);
|
||||
normilizeString(new_passwd);
|
||||
normalizeString(new_uname);
|
||||
normalizeString(new_passwd);
|
||||
|
||||
LoginDatabase.escape_string(new_uname);
|
||||
LoginDatabase.escape_string(new_passwd);
|
||||
@@ -141,7 +141,7 @@ AccountOpResult AccountMgr::ChangePassword(uint32 accid, std::string new_passwd)
|
||||
if (utf8length(new_passwd) > MAX_ACCOUNT_STR)
|
||||
return AOR_PASS_TOO_LONG;
|
||||
|
||||
normilizeString(new_passwd);
|
||||
normalizeString(new_passwd);
|
||||
|
||||
LoginDatabase.escape_string(new_passwd);
|
||||
if(!LoginDatabase.PExecute("UPDATE account SET sha_pass_hash=SHA1(CONCAT(username,':','%s')) WHERE id='%d'", new_passwd.c_str(), accid))
|
||||
@@ -192,7 +192,7 @@ bool AccountMgr::GetName(uint32 acc_id, std::string &name)
|
||||
|
||||
bool AccountMgr::CheckPassword(uint32 accid, std::string passwd)
|
||||
{
|
||||
normilizeString(passwd);
|
||||
normalizeString(passwd);
|
||||
LoginDatabase.escape_string(passwd);
|
||||
|
||||
QueryResult *result = LoginDatabase.PQuery("SELECT 1 FROM account WHERE id='%d' AND sha_pass_hash=SHA1(CONCAT(username,':','%s'))", accid, passwd.c_str());
|
||||
@@ -205,7 +205,7 @@ bool AccountMgr::CheckPassword(uint32 accid, std::string passwd)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AccountMgr::normilizeString(std::string& utf8str)
|
||||
bool AccountMgr::normalizeString(std::string& utf8str)
|
||||
{
|
||||
wchar_t wstr_buf[MAX_ACCOUNT_STR+1];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user