mirror of
https://github.com/znc/znc.git
synced 2026-08-09 18:32:55 +02:00
Update password hashes from SHA-256 to Argon2id
These days salted SHA-256 is considered quite weak for passwords. Transparently upgrade existing hashes upon login. Bump cmake requirement to able to use IMPORTED_TARGET, this will allow further cleanup in next commits.
This commit is contained in:
+2
-4
@@ -734,10 +734,8 @@ bool CZNC::WriteNewConfig(const CString& sConfigFile) {
|
||||
} while (!CUser::IsValidUsername(sUser));
|
||||
|
||||
vsLines.push_back("<User " + sUser + ">");
|
||||
CString sSalt;
|
||||
sAnswer = CUtils::GetSaltedHashPass(sSalt);
|
||||
vsLines.push_back("\tPass = " + CUtils::sDefaultHash + "#" + sAnswer +
|
||||
"#" + sSalt + "#");
|
||||
sAnswer = CUtils::AskSaltedHashPassForConfig();
|
||||
vsLines.push_back(sAnswer);
|
||||
|
||||
vsLines.push_back("\tAdmin = true");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user