[Opensim-dev] Updating attachment assets

Melanie melanie at t-data.com
Sun Oct 2 08:42:42 UTC 2011


Hi,

deleting only map tiles was introduced because allowing deletes of
arbitrary assets would allow malicious users to delete all of, say,
OSGrid's assets. This affects all grids where the asset server is
public and/or users can connect regions.

That restriction needs to remain in place by default, however, an
option can be added to allow all deletes, with appropriate warnings.

The HasScripts condition is to save the script states. They are
stored as XML within the object asset. This ensures that scripted
items are always stored with proper state. It needs to remain as it is.

If deleting the old asset is in place, it is no longer relevant as
far as bloat goes.

There is one caveat: When you first receive an attachment, the asset
is shared with the giver. So, on the very first detach, the old
asset can NOT be deleted.

Also, if you make a copy in inventory, and you delete the old asset,
the copy becomes invalid.

Solution: There is a bit in flags which isn't currently used. It
determines whether the asset is unique or shared. That bit would
need to be fully implemented. Not trivial, be warned.

Melanie

On 02/10/2011 10:18, Oren Hurvitz wrote:
> Occasionally, OpenSim updates the asset of an attachment. This is done in
> AttachmentsModule.UpdateKnownItem(). For example, this is done whenever the
> attachment is detached from the avatar. I have a couple of questions about
> this:
> 
> 1. A new asset is created, but the old asset is not deleted; it remains as a
> "zombie". I have changed my branch of OpenSim to delete the old asset, and
> this works well. However, this required making another change: currently
> OpenSim only allows deleting assets that are map tiles, and I changed it to
> allow deleting all types of assets. Why was this restriction ever made? If
> there's no objection, I will submit a patch for this change (delete old
> attachment asset + allow deleting all types of assets).
> 
> 2. UpdateKnownItem() decides whether it should update an attachment's asset
> using this 'if':
> 
>    if (grp.HasGroupChanged || grp.ContainsScripts())
> 
> Why check for ContainsScripts()? This was added in 8880ae (Sep 14, 2011). It
> causes what seem to be unnecessary updates.
> 
> Oren
> 
> 
> --
> View this message in context: http://opensim-dev.2196679.n2.nabble.com/Updating-attachment-assets-tp6852172p6852172.html
> Sent from the opensim-dev mailing list archive at Nabble.com.
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
> 
> 



More information about the Opensim-dev mailing list