mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Make private services forbid llHTTPRequest() calls by rejecting those that have the X-SecondLife-Shard header.
If you need to enable this, set AllowHttpRequestIn = true in [Network] for all private services or individual [*Service] sections.
This commit is contained in:
@@ -56,12 +56,17 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
RequestsReceived++;
|
||||
if (m_Auth != null && !m_Auth.Authenticate(httpRequest.Headers, httpResponse.AddHeader))
|
||||
|
||||
if (m_Auth != null)
|
||||
{
|
||||
|
||||
httpResponse.StatusCode = (int)HttpStatusCode.Unauthorized;
|
||||
httpResponse.ContentType = "text/plain";
|
||||
return new byte[0];
|
||||
HttpStatusCode statusCode;
|
||||
|
||||
if (!m_Auth.Authenticate(httpRequest.Headers, httpResponse.AddHeader, out statusCode))
|
||||
{
|
||||
httpResponse.StatusCode = (int)statusCode;
|
||||
httpResponse.ContentType = "text/plain";
|
||||
return new byte[0];
|
||||
}
|
||||
}
|
||||
|
||||
byte[] result = ProcessRequest(path, request, httpRequest, httpResponse);
|
||||
|
||||
Reference in New Issue
Block a user