diff options
author | Melanie Thielker | 2010-06-22 17:35:00 +0200 |
---|---|---|
committer | Melanie | 2010-06-22 23:39:25 +0100 |
commit | 854a8b91723afb98dc29dbd3afacaa895e58ea73 (patch) | |
tree | d05248d9ef7198559bcb9d40767767e5da81d472 /OpenSim | |
parent | * Fixed SimianGrid map tile uploads not having any objects in the images (diff) | |
download | opensim-SC_OLD-854a8b91723afb98dc29dbd3afacaa895e58ea73.zip opensim-SC_OLD-854a8b91723afb98dc29dbd3afacaa895e58ea73.tar.gz opensim-SC_OLD-854a8b91723afb98dc29dbd3afacaa895e58ea73.tar.bz2 opensim-SC_OLD-854a8b91723afb98dc29dbd3afacaa895e58ea73.tar.xz |
Security fix: Allow only textures to be fetched using HTTP texture cap
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs index f8e3d59..75efb79 100644 --- a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs | |||
@@ -131,6 +131,12 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps | |||
131 | 131 | ||
132 | if (texture != null) | 132 | if (texture != null) |
133 | { | 133 | { |
134 | if (texture.Type != (sbyte)AssetType.Texture) | ||
135 | { | ||
136 | httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound; | ||
137 | httpResponse.Send(); | ||
138 | return null; | ||
139 | } | ||
134 | SendTexture(httpRequest, httpResponse, texture); | 140 | SendTexture(httpRequest, httpResponse, texture); |
135 | } | 141 | } |
136 | else | 142 | else |
@@ -147,6 +153,12 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps | |||
147 | 153 | ||
148 | if (texture != null) | 154 | if (texture != null) |
149 | { | 155 | { |
156 | if (texture.Type != (sbyte)AssetType.Texture) | ||
157 | { | ||
158 | httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound; | ||
159 | httpResponse.Send(); | ||
160 | return null; | ||
161 | } | ||
150 | SendTexture(httpRequest, httpResponse, texture); | 162 | SendTexture(httpRequest, httpResponse, texture); |
151 | } | 163 | } |
152 | else | 164 | else |