diff options
| author | 2020-03-18 13:51:23 +0000 | |
|---|---|---|
| committer | 2020-03-18 13:51:23 +0000 | |
| commit | b9acde9aaf0ddae8b821b21821724adcdbea9359 (patch) | |
| tree | 7c76b8988dd9e31596ae2b114b15a762561e063d /src/modules/m_vhost.cpp | |
| parent | Remove support for 0/1 in getBool. (diff) | |
| parent | Allow commands to override ERR_{NEEDSMOREPARAMS,NOTREGISTERED}. (diff) | |
| download | inspircd++-b9acde9aaf0ddae8b821b21821724adcdbea9359.tar.gz inspircd++-b9acde9aaf0ddae8b821b21821724adcdbea9359.tar.bz2 inspircd++-b9acde9aaf0ddae8b821b21821724adcdbea9359.zip | |
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/m_vhost.cpp')
| -rw-r--r-- | src/modules/m_vhost.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/modules/m_vhost.cpp b/src/modules/m_vhost.cpp index 32da8b45d..ae858ab68 100644 --- a/src/modules/m_vhost.cpp +++ b/src/modules/m_vhost.cpp @@ -103,13 +103,21 @@ class ModuleVHost : public Module std::string mask = tag->getString("host"); if (mask.empty()) throw ModuleException("<vhost:host> is empty! at " + tag->getTagLocation()); + std::string username = tag->getString("user"); if (username.empty()) throw ModuleException("<vhost:user> is empty! at " + tag->getTagLocation()); + std::string pass = tag->getString("pass"); if (pass.empty()) throw ModuleException("<vhost:pass> 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, "<vhost> tag for %s at %s contains an plain text password, this is insecure!", + username.c_str(), tag->getTagLocation().c_str()); + } CustomVhost vhost(username, pass, hash, mask); newhosts.insert(std::make_pair(username, vhost)); |
