aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-07-24 11:32:09 +0100
committerGravatar Sadie Powell2021-07-24 11:34:10 +0100
commitf4c257e1b20d285b27f5c2942d03c142eee82c09 (patch)
tree7477a22cf109a1de3ac873986a67c66dfdece112 /src/modules
parentClean up the routing code in the ctables header. (diff)
parentAlso increase maxquit from 255 to 300. (diff)
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp2
-rw-r--r--src/modules/m_password_hash.cpp14
2 files changed, 12 insertions, 4 deletions
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 0d8569ceb..6c656384a 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -375,7 +375,7 @@ namespace OpenSSL
}
const std::string ciphersuites = tag->getString("ciphersuites");
- if (!ciphers.empty())
+ if (!ciphersuites.empty())
{
#if OPENSSL_VERSION_NUMBER >= 0x10101000L
if ((!ctx.SetCiphersuites(ciphersuites)) || (!clientctx.SetCiphersuites(ciphersuites)))
diff --git a/src/modules/m_password_hash.cpp b/src/modules/m_password_hash.cpp
index a9ef722e5..0c73ddf38 100644
--- a/src/modules/m_password_hash.cpp
+++ b/src/modules/m_password_hash.cpp
@@ -69,9 +69,17 @@ class CommandMkpasswd : public Command
return CmdResult::FAILURE;
}
- std::string hexsum = hp->Generate(parameters[1]);
- user->WriteNotice(parameters[0] + " hashed password for " + parameters[1] + " is " + hexsum);
- return CmdResult::SUCCESS;
+ try
+ {
+ std::string hexsum = hp->Generate(parameters[1]);
+ user->WriteNotice(parameters[0] + " hashed password for " + parameters[1] + " is " + hexsum);
+ return CmdResult::SUCCESS;
+ }
+ catch (const ModuleException& error)
+ {
+ user->WriteNotice("*** " + name + ": " + error.GetReason());
+ return CmdResult::FAILURE;
+ }
}
};