Browse Source

Merge pull request #2601 from jgarzik/uri-validate

RPC: strictly require HTTP URI "/"
0.8
Jeff Garzik 12 years ago
parent
commit
d9dd0318e1
  1. 5
      src/bitcoinrpc.cpp

5
src/bitcoinrpc.cpp

@ -940,6 +940,11 @@ void ServiceConnection(AcceptedConnection *conn) @@ -940,6 +940,11 @@ void ServiceConnection(AcceptedConnection *conn)
// Read HTTP message headers and body
ReadHTTPMessage(conn->stream(), mapHeaders, strRequest, nProto);
if (strURI != "/") {
conn->stream() << HTTPReply(HTTP_NOT_FOUND, "", false) << std::flush;
break;
}
// Check authorization
if (mapHeaders.count("authorization") == 0)
{

Loading…
Cancel
Save