From 725ccbb4774043be83fbaa26f3657acfa5313ebe Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 29 Apr 2017 16:58:43 +0100 Subject: add check for valid folded perms --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 668766b..a6f6aa3 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -699,13 +699,9 @@ namespace OpenSim.Region.Framework.Scenes // If this is an object, root prim perms may be more // permissive than folded perms. Use folded perms as // a mask - if (item.InvType == (int)InventoryType.Object) + uint foldedPerms = (item.CurrentPermissions & (uint)PermissionMask.FoldedMask) << (int)PermissionMask.FoldingShift; + if (foldedPerms != 0 && item.InvType == (int)InventoryType.Object) { - // Create a safe mask for the current perms - uint foldedPerms = (item.CurrentPermissions & 7) << 13; - if ((item.CurrentPermissions & (uint)PermissionMask.FoldedExport) != 0) - foldedPerms |= (uint)PermissionMask.Export; - foldedPerms |= permsMask; bool isRootMod = (item.CurrentPermissions & -- cgit v1.1