mirror of
https://github.com/znc/znc.git
synced 2026-08-07 09:22:55 +02:00
Add supports for salted hashes to znc.conf
These changes the format of the 'Pass' config option. The old format is still accepted. The new format is: Pass = plain#<plain text password> Pass = md5#<password hash> Pass = md5#<hash of password with salt appended>#<salt># This also makes ZNC only write configs in the new format. znc --makeconf and znc --makepass now always generate salted hashes. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1127 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -193,9 +193,10 @@ int main(int argc, char** argv) {
|
||||
|
||||
#endif /* HAVE_LIBSSL */
|
||||
if (bMakePass) {
|
||||
CString sHash = CUtils::GetHashPass();
|
||||
CString sSalt;
|
||||
CString sHash = CUtils::GetSaltedHashPass(sSalt);
|
||||
CUtils::PrintMessage("Use this in the <User> section of your config:");
|
||||
CUtils::PrintMessage("Pass = " + sHash + " -");
|
||||
CUtils::PrintMessage("Pass = md5#" + sHash + "#" + sSalt + "#");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user