diff options
author | Melanie Thielker | 2010-06-22 17:35:00 +0200 |
---|---|---|
committer | Melanie Thielker | 2010-06-22 17:35:00 +0200 |
commit | 5c02fb435db171daf6d1ef360340137b3b0fd467 (patch) | |
tree | b303b532fab142e00dd7c35a4fd6a6f50479095b /OpenSim/Region/CoreModules/Avatar | |
parent | Cause collisions with the avatar to be sent to attachments. Currently (diff) | |
download | opensim-SC-5c02fb435db171daf6d1ef360340137b3b0fd467.zip opensim-SC-5c02fb435db171daf6d1ef360340137b3b0fd467.tar.gz opensim-SC-5c02fb435db171daf6d1ef360340137b3b0fd467.tar.bz2 opensim-SC-5c02fb435db171daf6d1ef360340137b3b0fd467.tar.xz |
Security fix: Allow only textures to be fetched using HTTP texture cap
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-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 |