aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_customtitle.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2020-03-11 14:32:46 +0000
committerGravatar Sadie Powell2020-03-11 15:06:19 +0000
commit0a67b8861adfca7b09e59d9639e26b6bf71859a5 (patch)
treea478051a877b14b9a225e529949e90725f9412bd /src/modules/m_customtitle.cpp
parentFix detection of the "plaintext" pseudo-hash being case sensitive. (diff)
downloadinspircd++-0a67b8861adfca7b09e59d9639e26b6bf71859a5.tar.gz
inspircd++-0a67b8861adfca7b09e59d9639e26b6bf71859a5.tar.bz2
inspircd++-0a67b8861adfca7b09e59d9639e26b6bf71859a5.zip
Warn if the server config contains an unhashed password.
This will be made a hard failure in v4.
Diffstat (limited to 'src/modules/m_customtitle.cpp')
-rw-r--r--src/modules/m_customtitle.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp
index faf614e2f..7cdd0bc4f 100644
--- a/src/modules/m_customtitle.cpp
+++ b/src/modules/m_customtitle.cpp
@@ -136,7 +136,13 @@ class ModuleCustomTitle : public Module, public Whois::LineEventListener
if (pass.empty())
throw ModuleException("<title:password> is empty at " + tag->getTagLocation());
- std::string hash = tag->getString("hash");
+ const std::string hash = tag->getString("hash", "plaintext", 1);
+ if (stdalgo::string::equalsci(hash, "plaintext"))
+ {
+ ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "<title> tag for %s at %s contains an plain text password, this is insecure!",
+ name.c_str(), tag->getTagLocation().c_str());
+ }
+
std::string host = tag->getString("host", "*@*");
std::string title = tag->getString("title");
std::string vhost = tag->getString("vhost");