diff options
author | Attila Molnar <attilamolnar@hush.com> | 2015-10-14 10:21:56 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2015-10-14 10:21:56 +0200 |
commit | a2461fb7e1c28e28e64b61256d7a547162a83f6e (patch) | |
tree | a299f41b66eba47f554536e6c7921d0aeaec36da /src/channels.cpp | |
parent | 009cc921802a917f8680a3c6e5294a303438c2fd (diff) | |
parent | 8c90682adc3c67b0779db4f57686e4c10778a36d (diff) |
Merge pull request #1093 from SaberUK/master+tsc
Update another password check to use InspIRCd::TimingSafeCompare.
Diffstat (limited to 'src/channels.cpp')
-rw-r--r-- | src/channels.cpp | 2 |
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()); |