diff options
| author | 2020-07-15 11:00:24 +0100 | |
|---|---|---|
| committer | 2020-07-15 11:00:24 +0100 | |
| commit | 93ae431955a90e6e026135f611374c17d780c8f2 (patch) | |
| tree | 6a05be8c3277fdae1a6569fe3445d0fd6c9006ce /src/modules/m_bcrypt.cpp | |
| parent | Upgrade GitHub Actions to use Ubuntu 20.04. (diff) | |
| parent | Various improvements to the build system. (diff) | |
Merge branch 'insp3' into master.
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 |
