mirror of
https://github.com/znc/znc.git
synced 2026-08-08 09:52: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
-7
@@ -383,20 +383,15 @@ int main(int argc, char** argv) {
|
||||
#endif /* HAVE_LIBSSL */
|
||||
|
||||
if (bMakePass) {
|
||||
CString sSalt;
|
||||
CUtils::PrintMessage("Type your new password.");
|
||||
CString sHash = CUtils::GetSaltedHashPass(sSalt);
|
||||
CString sPass = CUtils::AskSaltedHashPassForConfig();
|
||||
CUtils::PrintMessage("Kill ZNC process, if it's running.");
|
||||
CUtils::PrintMessage(
|
||||
"Then replace password in the <User> section of your config with "
|
||||
"this:");
|
||||
// Not PrintMessage(), to remove [**] from the beginning, to ease
|
||||
// copypasting
|
||||
std::cout << "<Pass password>" << std::endl;
|
||||
std::cout << "\tMethod = " << CUtils::sDefaultHash << std::endl;
|
||||
std::cout << "\tHash = " << sHash << std::endl;
|
||||
std::cout << "\tSalt = " << sSalt << std::endl;
|
||||
std::cout << "</Pass>" << std::endl;
|
||||
std::cout << sPass << std::endl;
|
||||
CUtils::PrintMessage(
|
||||
"After that start ZNC again, and you should be able to login with "
|
||||
"the new password.");
|
||||
|
||||
Reference in New Issue
Block a user