From c1cc5cf147babcd834ba0dbbdd4b1c1d4ae010b6 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sat, 28 Jun 2014 18:27:51 +0200 Subject: Use TimingSafeCompare() to compare passwords and password hashes (non-hmac only) Issue #882 --- src/command_parse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/command_parse.cpp') 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& parameters, unsigned int splithere, int extra, bool usemax) -- cgit v1.3.1-10-gc9f91