]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_customtitle.cpp
Warn if the server config contains an unhashed password.
[user/henk/code/inspircd.git] / src / modules / m_customtitle.cpp
index faf614e2f4b7382b41587e2c83962ce4dc1ec989..7cdd0bc4fd3f42543755fd3f5852aee6d10645f9 100644 (file)
@@ -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");