From 213629ef52c87f637c1bb5e57b81ec858078255b Mon Sep 17 00:00:00 2001 From: orignal Date: Thu, 22 Dec 2016 20:30:50 -0500 Subject: [PATCH] drop highest bit for token --- HTTPServer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/HTTPServer.cpp b/HTTPServer.cpp index 84818e8e..af5dfe73 100644 --- a/HTTPServer.cpp +++ b/HTTPServer.cpp @@ -775,6 +775,7 @@ namespace http { { uint32_t token; RAND_bytes ((uint8_t *)&token, 4); + token |= 0x7FFFFFFF; // clear first bit auto ts = i2p::util::GetSecondsSinceEpoch (); for (auto it = m_Tokens.begin (); it != m_Tokens.end (); ) {