diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-03 22:05:54 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-03 22:05:54 +0000 |
commit | a271618c60cf188eb6483f9fcfb567a434f75469 (patch) | |
tree | 9dc51c9035a94e584d7c1a6d94e0becf857a6096 /src/modules/extra | |
parent | d0810dfaba6f160336d18ff0073e0065b35b59e3 (diff) |
Check for people trying to literally put the fingerprint in as a pass
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5134 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra')
-rw-r--r-- | src/modules/extra/m_ssl_oper_cert.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/extra/m_ssl_oper_cert.cpp b/src/modules/extra/m_ssl_oper_cert.cpp index 0d1ab045c..cf68fe5a4 100644 --- a/src/modules/extra/m_ssl_oper_cert.cpp +++ b/src/modules/extra/m_ssl_oper_cert.cpp @@ -88,7 +88,7 @@ class ModuleOperSSLCert : public Module virtual int OnOperCompare(const std::string &data, const std::string &input) { ServerInstance->Log(DEBUG,"HasCert=%d, data='%s' input='%s'",HasCert,data.c_str(), input.c_str()); - if (((data.length()) && (data.length() == cert->GetFingerprint().length()))) + if ((HasCert) && ((data.length()) && (data.length() == cert->GetFingerprint().length()))) { ServerInstance->Log(DEBUG,"Lengths match, cert='%s'",cert->GetFingerprint().c_str()); if (data == cert->GetFingerprint()) @@ -98,6 +98,10 @@ class ModuleOperSSLCert : public Module } else { + /* Someones playing silly buggers, and entering in literals asa the oper pass */ + if (input == cert->GetFingerprint()) + return -1; + ServerInstance->Log(DEBUG,"'%s' != '%s'",data.c_str(), cert->GetFingerprint().c_str()); return 0; } |