diff options
| author | 2015-09-02 04:51:28 +0100 | |
|---|---|---|
| committer | 2015-10-14 06:25:35 +0100 | |
| commit | 8c90682adc3c67b0779db4f57686e4c10778a36d (patch) | |
| tree | 56e72bef1289f655a4dded84e7f51ec3eaa312a3 /src/channels.cpp | |
| parent | m_ssl_openssl Use SSL_MODE_RELEASE_BUFFERS if available (diff) | |
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()); |
