From bb848f8fd2eedaddd22420fbaf37249d4a9ac27b Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 9 Apr 2007 20:24:04 +0000 Subject: The hmac stuff was slightly wrong, calculating the 2nd part left a concatenation outside the bracket git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6787 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/treesocket1.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index 03fa69197..1dede8b31 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -143,11 +143,12 @@ std::string TreeSocket::MakePass(const std::string &password, const std::string hmac2 += static_cast(password[n] ^ 0x36); } + hmac2 += challenge; HashResetRequest(Utils->Creator, sha256).Send(); hmac2 = HashSumRequest(Utils->Creator, sha256, hmac2).Send(); HashResetRequest(Utils->Creator, sha256).Send(); - std::string hmac = hmac1 + hmac2 + challenge; + std::string hmac = hmac1 + hmac2; hmac = HashSumRequest(Utils->Creator, sha256, hmac).Send(); return "HMAC-SHA256:"+ hmac; -- cgit v1.2.3