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:
@@ -999,8 +999,8 @@ CUser* CWebAdminSock::GetNewUser(CString& sPageRet, CUser* pUser) {
|
||||
|
||||
if (!sArg.empty()) {
|
||||
CString sSalt = CUtils::GetSalt();
|
||||
CString sSaltedPass = sArg + sSalt;
|
||||
pNewUser->SetPass(sSaltedPass.MD5(), true, sSalt);
|
||||
CString sHash = CUtils::SaltedHash(sArg, sSalt);
|
||||
pNewUser->SetPass(sHash, true, sSalt);
|
||||
}
|
||||
|
||||
VCString vsArgs;
|
||||
|
||||
Reference in New Issue
Block a user