diff options
| author | 2007-04-09 20:24:04 +0000 | |
|---|---|---|
| committer | 2007-04-09 20:24:04 +0000 | |
| commit | bb848f8fd2eedaddd22420fbaf37249d4a9ac27b (patch) | |
| tree | ce60ba06b19c81639217afd4da3604a965efa09a /src/modules/m_spanningtree/treesocket1.cpp | |
| parent | D'oh, this is what causes it to randomly not allow the HMAC, when theres an =... (diff) | |
| download | inspircd++-bb848f8fd2eedaddd22420fbaf37249d4a9ac27b.tar.gz inspircd++-bb848f8fd2eedaddd22420fbaf37249d4a9ac27b.tar.bz2 inspircd++-bb848f8fd2eedaddd22420fbaf37249d4a9ac27b.zip | |
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
Diffstat (limited to 'src/modules/m_spanningtree/treesocket1.cpp')
| -rw-r--r-- | src/modules/m_spanningtree/treesocket1.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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<char>(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; |
