diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-03-11 01:25:56 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-03-11 01:25:56 +0000 |
commit | 1a1f8dfa4c30cc2a71c867b459f5907999b85d1e (patch) | |
tree | eed7a6c91e98262f2e0f0090b9863e0696209ac2 /src/modules | |
parent | 56d0bc899d354480516ffd27b875af9bb31b92cf (diff) |
Fix ComparePass for servers not supporting HMAC-SHA256 when ChallengeResponse is on in configuration
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11205 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree/hmac.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/hmac.cpp b/src/modules/m_spanningtree/hmac.cpp index 6dceafe22..75f32cb53 100644 --- a/src/modules/m_spanningtree/hmac.cpp +++ b/src/modules/m_spanningtree/hmac.cpp @@ -130,9 +130,9 @@ std::string TreeSocket::RandString(unsigned int ilength) bool TreeSocket::ComparePass(const std::string &ours, const std::string &theirs) { - if (Utils->ChallengeResponse) + if (Utils->ChallengeResponse && !ourchallenge.empty() && !theirchallenge.empty()) { - std::string our_hmac = this->MakePass(ours, this->GetOurChallenge()); + std::string our_hmac = this->MakePass(ours, ourchallenge); /* Straight string compare of hashes */ return our_hmac == theirs; |