diff options
Diffstat (limited to 'src/modules/m_bcrypt.cpp')
| -rw-r--r-- | src/modules/m_bcrypt.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/modules/m_bcrypt.cpp b/src/modules/m_bcrypt.cpp index 3b87293ff..685a82f87 100644 --- a/src/modules/m_bcrypt.cpp +++ b/src/modules/m_bcrypt.cpp @@ -58,13 +58,7 @@ class BCryptProvider : public HashProvider bool Compare(const std::string& input, const std::string& hash) override { - std::string ret = Generate(input, hash); - if (ret.empty()) - return false; - - if (ret == hash) - return true; - return false; + return InspIRCd::TimingSafeCompare(Generate(input, hash), hash); } std::string ToPrintable(const std::string& raw) override |
