From 8c90682adc3c67b0779db4f57686e4c10778a36d Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Wed, 2 Sep 2015 04:51:28 +0100 Subject: Update another password check to use InspIRCd::TimingSafeCompare. --- src/channels.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/channels.cpp') 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()); -- cgit v1.2.3