Browse Source

fixes issue 732 and wave hi to ISPG

pull/734/head
Jeff Becker 8 years ago
parent
commit
fa191e2928
  1. 8
      HTTPServer.cpp

8
HTTPServer.cpp

@ -709,11 +709,15 @@ namespace http { @@ -709,11 +709,15 @@ namespace http {
char b64_creds[64];
std::size_t len = 0;
len = i2p::data::ByteStreamToBase64((unsigned char *)expected.c_str(), expected.length(), b64_creds, sizeof(b64_creds));
/* if we decoded properly then check credentials */
if(len) {
b64_creds[len] = '\0';
expected = "Basic ";
expected += b64_creds;
if (provided == expected)
return true;
return expected == provided;
}
/** we decoded wrong so it's not a correct login credential */
return false;
}
LogPrint(eLogWarning, "HTTPServer: auth failure from ", m_Socket->remote_endpoint().address ());

Loading…
Cancel
Save