Security fix: Allow only textures to be fetched using HTTP texture cap
parent
1e1485de5b
commit
854a8b9172
|
@ -131,6 +131,12 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
|
||||||
|
|
||||||
if (texture != null)
|
if (texture != null)
|
||||||
{
|
{
|
||||||
|
if (texture.Type != (sbyte)AssetType.Texture)
|
||||||
|
{
|
||||||
|
httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound;
|
||||||
|
httpResponse.Send();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
SendTexture(httpRequest, httpResponse, texture);
|
SendTexture(httpRequest, httpResponse, texture);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -147,6 +153,12 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
|
||||||
|
|
||||||
if (texture != null)
|
if (texture != null)
|
||||||
{
|
{
|
||||||
|
if (texture.Type != (sbyte)AssetType.Texture)
|
||||||
|
{
|
||||||
|
httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound;
|
||||||
|
httpResponse.Send();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
SendTexture(httpRequest, httpResponse, texture);
|
SendTexture(httpRequest, httpResponse, texture);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue