diff options
author | Giel van Schijndel <me@mortis.eu> | 2011-06-25 04:31:48 +0200 |
---|---|---|
committer | Giel van Schijndel <me@mortis.eu> | 2011-06-26 21:07:59 +0200 |
commit | e913574e027d7d75783b9ffc56375b2edc0418f3 (patch) | |
tree | ca96bcdd0fc70c1fe8c520ca30d4c90c4a85ecc6 /src | |
parent | c9e70d4c0a0585a253708a3c01fe4cee50057a63 (diff) |
rpc: don't send 403 when using SSL to prevent DoS
Signed-off-by: Giel van Schijndel <me@mortis.eu>
Diffstat (limited to 'src')
-rw-r--r-- | src/rpc.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rpc.cpp b/src/rpc.cpp index 7e0f05c6da..780209920e 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -1889,7 +1889,9 @@ void ThreadRPCServer2(void* parg) // Restrict callers by IP if (!ClientAllowed(peer.address().to_string())) { - stream << HTTPReply(403, "") << std::flush; + // Only send a 403 if we're not using SSL to prevent a DoS during the SSL handshake. + if (!fUseSSL) + stream << HTTPReply(403, "") << std::flush; continue; } |