diff options
| author | 2014-06-28 18:27:51 +0200 | |
|---|---|---|
| committer | 2014-06-28 18:27:51 +0200 | |
| commit | c1cc5cf147babcd834ba0dbbdd4b1c1d4ae010b6 (patch) | |
| tree | 3abb61ec559f392aef92c134e02bca950e68184d /src/command_parse.cpp | |
| parent | Add InspIRCd::TimingSafeCompare() function that compares strings in a timing-... (diff) | |
Use TimingSafeCompare() to compare passwords and password hashes (non-hmac only)
Issue #882
Diffstat (limited to 'src/command_parse.cpp')
| -rw-r--r-- | src/command_parse.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp index eed549deb..ed996e83c 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -40,7 +40,7 @@ bool InspIRCd::PassCompare(Extensible* ex, const std::string& data, const std::s if (!hashtype.empty() && hashtype != "plaintext") return false; - return (data == input); + return TimingSafeCompare(data, input); } bool CommandParser::LoopCall(User* user, Command* handler, const std::vector<std::string>& parameters, unsigned int splithere, int extra, bool usemax) |
