fix(Core/Misc): few improvements to ut8 handling (#2455)

This commit is contained in:
Viste
2019-12-02 10:33:44 +03:00
committed by Stoabrogga
parent ad320ec9d9
commit ec808793ae
11 changed files with 200 additions and 94 deletions

View File

@@ -173,7 +173,7 @@ int RASocket::check_access_level(const std::string& user)
{
std::string safeUser = user;
AccountMgr::normalizeString(safeUser);
Utf8ToUpperOnlyLatin(safeUser);
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_ACCESS);
stmt->setString(0, safeUser);
@@ -204,10 +204,10 @@ int RASocket::check_access_level(const std::string& user)
int RASocket::check_password(const std::string& user, const std::string& pass)
{
std::string safe_user = user;
AccountMgr::normalizeString(safe_user);
Utf8ToUpperOnlyLatin(safe_user);
std::string safe_pass = pass;
AccountMgr::normalizeString(safe_pass);
Utf8ToUpperOnlyLatin(safe_pass);
std::string hash = AccountMgr::CalculateShaPassHash(safe_user, safe_pass);