From 0a67b8861adfca7b09e59d9639e26b6bf71859a5 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 11 Mar 2020 14:32:46 +0000 Subject: Warn if the server config contains an unhashed password. This will be made a hard failure in v4. --- src/users.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 4edfd574c..0c95ecc0b 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1155,9 +1155,9 @@ void LocalUser::SetClass(const std::string &explicit_name) } } - if (regdone && !c->config->getString("password").empty()) + if (regdone && !c->password.empty()) { - if (!ServerInstance->PassCompare(this, c->config->getString("password"), password, c->config->getString("hash"))) + if (!ServerInstance->PassCompare(this, c->password, password, c->passwordhash)) { ServerInstance->Logs->Log("CONNECTCLASS", LOG_DEBUG, "Bad password, skipping"); continue; @@ -1290,4 +1290,6 @@ void ConnectClass::Update(const ConnectClass* src) limit = src->limit; resolvehostnames = src->resolvehostnames; ports = src->ports; + password = src->password; + passwordhash = src->passwordhash; } -- cgit v1.2.3