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_cgiirc.cpp | |
| parent | Remove support for 0/1 in getBool. (diff) | |
| parent | Allow commands to override ERR_{NEEDSMOREPARAMS,NOTREGISTERED}. (diff) | |
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/m_cgiirc.cpp')
| -rw-r--r-- | src/modules/m_cgiirc.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index 94b7dab4d..241eb118b 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -307,12 +307,19 @@ class ModuleCgiIRC // The IP address will be received via the WEBIRC command. const std::string fingerprint = tag->getString("fingerprint"); const std::string password = tag->getString("password"); + const std::string passwordhash = tag->getString("hash", "plaintext", 1); // WebIRC blocks require a password. if (fingerprint.empty() && password.empty()) throw ModuleException("When using <cgihost type=\"webirc\"> either the fingerprint or password field is required, at " + tag->getTagLocation()); - webirchosts.push_back(WebIRCHost(mask, fingerprint, password, tag->getString("hash"))); + if (!password.empty() && stdalgo::string::equalsci(passwordhash, "plaintext")) + { + ServerInstance->Logs.Log(MODNAME, LOG_DEFAULT, "<cgihost> tag at %s contains an plain text password, this is insecure!", + tag->getTagLocation().c_str()); + } + + webirchosts.push_back(WebIRCHost(mask, fingerprint, password, passwordhash)); } else { |
