summaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2015-09-02 04:51:28 +0100
committerPeter Powell <petpow@saberuk.com>2015-10-14 06:25:35 +0100
commit8c90682adc3c67b0779db4f57686e4c10778a36d (patch)
tree56e72bef1289f655a4dded84e7f51ec3eaa312a3 /src/channels.cpp
parent6447b7be822439cce2f8109ea5362edeec4c6255 (diff)
Update another password check to use InspIRCd::TimingSafeCompare.
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index f79b5b89f..d99a57723 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -241,7 +241,7 @@ Channel* Channel::JoinUser(LocalUser* user, std::string cname, bool override, co
if (!ckey.empty())
{
FIRST_MOD_RESULT(OnCheckKey, MOD_RESULT, (user, chan, key));
- if (!MOD_RESULT.check((ckey == key) || can_bypass))
+ if (!MOD_RESULT.check(InspIRCd::TimingSafeCompare(ckey, key) || can_bypass))
{
// If no key provided, or key is not the right one, and can't bypass +k (not invited or option not enabled)
user->WriteNumeric(ERR_BADCHANNELKEY, "%s :Cannot join channel (Incorrect channel key)", chan->name.c_str());