Browse Source

drop highest bit for token

pull/750/head
orignal 8 years ago
parent
commit
213629ef52
  1. 1
      HTTPServer.cpp

1
HTTPServer.cpp

@ -775,6 +775,7 @@ namespace http {
{ {
uint32_t token; uint32_t token;
RAND_bytes ((uint8_t *)&token, 4); RAND_bytes ((uint8_t *)&token, 4);
token |= 0x7FFFFFFF; // clear first bit
auto ts = i2p::util::GetSecondsSinceEpoch (); auto ts = i2p::util::GetSecondsSinceEpoch ();
for (auto it = m_Tokens.begin (); it != m_Tokens.end (); ) for (auto it = m_Tokens.begin (); it != m_Tokens.end (); )
{ {

Loading…
Cancel
Save