mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Add CUtils::SaltedHash() for doing salted hashes and do some cleanup
The stuff in CUtils::GetHashPass() and CUtils::GetSaltedHashPass() shouldn't hurt, since we don't do such stuff in other places for passwords either. This should improve the readability of the code a lot. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1324 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
4
User.cpp
4
User.cpp
@@ -827,9 +827,7 @@ bool CUser::CheckPass(const CString& sPass) const {
|
||||
return (sPass == m_sPass);
|
||||
}
|
||||
|
||||
CString sSaltedPass = sPass + m_sPassSalt;
|
||||
|
||||
return (m_sPass.Equals(sSaltedPass.MD5()));
|
||||
return m_sPass.Equals(CUtils::SaltedHash(sPass, m_sPassSalt));
|
||||
}
|
||||
|
||||
/*CClient* CUser::GetClient() {
|
||||
|
||||
Reference in New Issue
Block a user