From f94d5010fc8bdb4ee37694e6bb7e32cc7f9cade2 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 9 Apr 2007 18:43:11 +0000 Subject: D'oh, this is what causes it to randomly not allow the HMAC, when theres an = in the string, it borks! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6786 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/treesocket1.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index af3117b07..03fa69197 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -286,7 +286,10 @@ std::string TreeSocket::RandString(unsigned int length) } for (unsigned int i = 0; i < length; i++) - out += static_cast((randombuf[i] & 0x7F) | 0x21); + { + char randchar = static_cast((randombuf[i] & 0x7F) | 0x21); + out += (randchar == '=' ? '_' : randchar); + } delete[] randombuf; return out; -- cgit v1.2.3