diff options
author | CasperW | 2010-01-18 17:56:27 +0100 |
---|---|---|
committer | CasperW | 2010-01-18 17:56:27 +0100 |
commit | d9c48e70a9a01f56135ede2cef9ec45c7dddf567 (patch) | |
tree | ca045669c4400a9feb95948b10ed90b7862b30ba /OpenSim | |
parent | Add chat banning. Staff patch (diff) | |
download | opensim-SC-d9c48e70a9a01f56135ede2cef9ec45c7dddf567.zip opensim-SC-d9c48e70a9a01f56135ede2cef9ec45c7dddf567.tar.gz opensim-SC-d9c48e70a9a01f56135ede2cef9ec45c7dddf567.tar.bz2 opensim-SC-d9c48e70a9a01f56135ede2cef9ec45c7dddf567.tar.xz |
Fix a major security problem with osSetDynamicTexture which allowed the deletion of /any/ asset.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index f51d0c2..679c871 100644 --- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs | |||
@@ -358,11 +358,18 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
358 | // tmptex.DefaultTexture.Fullbright = true; | 358 | // tmptex.DefaultTexture.Fullbright = true; |
359 | 359 | ||
360 | part.UpdateTexture(tmptex); | 360 | part.UpdateTexture(tmptex); |
361 | } | 361 | } |
362 | 362 | ||
363 | if (oldID != UUID.Zero && ((Disp & DISP_EXPIRE) != 0)) | 363 | if (oldID != UUID.Zero && ((Disp & DISP_EXPIRE) != 0)) |
364 | { | 364 | { |
365 | scene.AssetService.Delete(oldID.ToString()); | 365 | if (oldAsset == null) oldAsset = scene.AssetService.Get(oldID.ToString()); |
366 | if (oldAsset != null) | ||
367 | { | ||
368 | if (oldAsset.Temporary == true) | ||
369 | { | ||
370 | scene.AssetService.Delete(oldID.ToString()); | ||
371 | } | ||
372 | } | ||
366 | } | 373 | } |
367 | } | 374 | } |
368 | 375 | ||