Change threat level of osMakeNotecard to High because of it's griefing

potential (asset bloat, asset server DOS due to no enforced delay)
Formatting cleanup. Change default permissions on the notecard to
not include "anyone can copy" and "anyone can move", as they are
meaningless on non-prim items.
0.6.0-stable
Melanie Thielker 2008-11-06 14:37:41 +00:00
parent 09f86d7e99
commit 4cd7907314
1 changed files with 46 additions and 43 deletions

View File

@ -962,9 +962,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
// This needs ThreatLevel high. It is an excellent griefer tool,
// In a loop, it can cause asset bloat and DOS levels of asset
// writes.
//
public void osMakeNotecard(string notecardName, LSL_Types.list contents)
{
CheckThreatLevel(ThreatLevel.None, "osMakeNotecard");
CheckThreatLevel(ThreatLevel.High, "osMakeNotecard");
m_host.AddScriptLPS(1);
// Create new asset
@ -1000,7 +1004,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
taskItem.CreatorID = m_host.OwnerID;
taskItem.BasePermissions = (uint)PermissionMask.All;
taskItem.CurrentPermissions = (uint)PermissionMask.All;
taskItem.EveryonePermissions = (uint)PermissionMask.All;
taskItem.EveryonePermissions = 0;
taskItem.NextPermissions = (uint)PermissionMask.All;
taskItem.GroupID = m_host.GroupID;
taskItem.GroupPermissions = 0;
@ -1010,7 +1014,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
taskItem.AssetID = asset.FullID;
m_host.AddInventoryItem(taskItem);
}
}
}