summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2020-03-11 14:32:46 +0000
committerSadie Powell <sadie@witchery.services>2020-03-11 15:06:19 +0000
commit0a67b8861adfca7b09e59d9639e26b6bf71859a5 (patch)
treea478051a877b14b9a225e529949e90725f9412bd /src/users.cpp
parent55882c39f1025e29674c42741ee1e00ec8c2169e (diff)
Warn if the server config contains an unhashed password.
This will be made a hard failure in v4.
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp6
1 files changed, 4 insertions, 2 deletions
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;
}