Fix a major security problem with osSetDynamicTexture which allowed the deletion of /any/ asset.

avinationmerge
CasperW 2010-01-18 17:56:27 +01:00
parent 51bb311565
commit d9c48e70a9
1 changed files with 12 additions and 5 deletions

View File

@ -362,7 +362,14 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
if (oldID != UUID.Zero && ((Disp & DISP_EXPIRE) != 0)) if (oldID != UUID.Zero && ((Disp & DISP_EXPIRE) != 0))
{ {
scene.AssetService.Delete(oldID.ToString()); if (oldAsset == null) oldAsset = scene.AssetService.Get(oldID.ToString());
if (oldAsset != null)
{
if (oldAsset.Temporary == true)
{
scene.AssetService.Delete(oldID.ToString());
}
}
} }
} }