From 1a1f8dfa4c30cc2a71c867b459f5907999b85d1e Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 11 Mar 2009 01:25:56 +0000 Subject: 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 --- src/modules/m_spanningtree/hmac.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/m_spanningtree') 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; -- cgit v1.2.3