summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-11 01:25:56 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-11 01:25:56 +0000
commit1a1f8dfa4c30cc2a71c867b459f5907999b85d1e (patch)
treeeed7a6c91e98262f2e0f0090b9863e0696209ac2 /src/modules/m_spanningtree
parent56d0bc899d354480516ffd27b875af9bb31b92cf (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/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/hmac.cpp4
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;