Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007914opensim[REGION] Script Functionspublic2016-05-30 16:392016-08-18 18:57
ReporterMandarinka Tasty 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Statuspatch includedResolutionopen 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0007914: Fix for osTeleportAgent
DescriptionHello :)

Accordingly to definition of function osTeleportAgent,

(http://opensimulator.org/wiki/OsTeleportAgent [^]),

there should be followed certain conditions to make this function work.

I. Owner of the object containing the script with osTeleportAgent

should be the same person as owner of the parcel, where object is located

II. Avatar ( resident ) that is going to be teleported by this function

should also be present on the same parcel, where object is located.

I have noticed, that it does not work actually in OpenSim.

Indeed, the appropriate part of the code has been removed ( commented out ) and

was not sufficient to make our conditions properly work.
Steps To ReproduceThe fix is very simple:

I have add proper condition in form of logic AND:

World.LandChannel.GetLandObject(m_host.AbsolutePosition).LandData.OwnerID == m_host.OwnerID <--- this checks,
whether object's owner is the same as parcel's owner

World.LandChannel.GetLandObject(presence.AbsolutePosition).LandData.OwnerID == m_host.OwnerID <--- this checks,
whether avatar is present at the parcel owned by the object's owner.

that is because: ScenePresence presence = World.GetScenePresence(agentId)

The bool relaxRestrictions located inside the condition in form of logic OR

is necessary to make osTeleportOwner work, without any restrictions.

So final condition is following:

if (relaxRestrictions || (World.LandChannel.GetLandObject(m_host.AbsolutePosition).LandData.OwnerID == m_host.OwnerID) && World.LandChannel.GetLandObject(presence.AbsolutePosition).LandData.OwnerID == m_host.OwnerID)


I've compiled and verified. It works for me, though, as usually preprints,

it requires confirmation by other person :)
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (Multiple Regions per Sim)
Physics EngineBasicPhysics
Script Engine
EnvironmentMono / Linux64
Mono VersionOther
Viewer
Attached Filespatch file icon 0001-Fix-for-osTeleportAgent.patch [^] (6,925 bytes) 2016-05-30 23:57 [Show Content]

- Relationships

-  Notes
(0030391)
JeffKelley (reporter)
2016-05-30 17:26

> I. Owner of the object containing the script with osTeleportAgent
> should be the same person as owner of the parcel, where object is located

This would break a lot of blamgates and make team work difficult or impossible when we have a mix of objects' owners on a shared region. Suppose I have to add gates to a region and the land owner is not available. Or the land owner did rez my gates but did not care to share the script with group, then I am unable to update scripts. I think we have enough fine-grained control in osslEnable.ini. I am for relaxing this condition.
(0030392)
Mandarinka Tasty (reporter)
2016-05-30 17:43

Well, I only follow the definition of osTeleportAgent taken from wiki:

For osTeleportAgent() to work, the owner of the prim containing the script must be the same as the parcel that the avatar is currently on. If this isn't the case then the function fails silently.

I do not insist to make my patch be accepted.

I just pay attention on it )
(0030393)
smxy (reporter)
2016-05-30 17:50

If you look at the commented out code, it says that it is redundant and should be removed. I think the right solution here *is* to remove the commented out code and change the wiki entry to match the reality of the code.
(0030394)
danbanner (manager)
2016-05-30 17:55

I too have several teleporters that using osTeleportAgent that this patch would break as well
-1
(0030395)
Mandarinka Tasty (reporter)
2016-05-30 18:04

Yes, also true. If wiki definition is old = obsolete, then

there is not reason to patch it. I agree.

Hence , any restrictions can be removed, and function may rely on ossl Owners Classes in osslEnable.ini.

Ok, let me confess here, what situation worries me,

how to prevent eventual griefer attacks using such function,

if object with malicious code is rezzed by unaware Estate Owner or Estate Manager ?

Especially when script is non=modyfiable for them ?
(0030396)
Mandarinka Tasty (reporter)
2016-05-30 18:14
edited on: 2016-05-30 18:20

i have another example from commercial grid:

Region A, there are 10 parcels owned by 10 various residents,

they wish to use osTeleportAgent so i set it for them in their region.

And now: Owner of parcel I can easily teleport any resident from parcel II owned

by other resident. How to prevent it ?

I have not time to check what they do in their regions.

and i think that plenty of grids with rentals can experience such issues.


Anyway, I agree with you , if wiki definition is improper, then

patch is absolutely useless.

(0030397)
smxy (reporter)
2016-05-30 18:37

Well, let's wait and get diva and melanie's input. They may see something the rest of us are missing.
(0030398)
melanie (administrator)
2016-05-30 19:35

All cases are valid. As I said previously, different situations require different solutions. In this case, I believe that there needs to be yet another config option to either restrict or not restrict osTeleportAgent.

We can NOT change current default behavior as too many existing sims depend on it, but we can provide a more secure option.
(0030401)
Mandarinka Tasty (reporter)
2016-05-31 00:10

Thank You for all remarks :)

I didn't know that osTeleportAgent is used by many without restrictions

that are described in Wiki.

I've been also using it but I was setting objects accordingly to theory.

Anyway I absolutely realise and understand all concerns.

It's obvious, that current behaviour must be continued, too.

There has been also introduced, that another config option could be useful

to satisfy everyone. So I've decided to write such code and included it

in new version of my patch.

I have created new variable for osslEnable.ini file:

AllowRestrictedTeleportFunctions, default setting is false,

to satisfy actual users.

So AllowRestrictedTeleportFunctions = false, does not change anything

in aspect of osTeleportAgent.

And if AllowRestrictedTeleportFunctions = true,

then new checks, concerning object's owner, parcel's owner, and teleported avatar, start to work.

Thank You for all creative feedbacks in advance :)
(0030402)
smxy (reporter)
2016-05-31 04:52

If the new patch is accepted, be sure to update the wiki entry to reflect the changes. :)
(0030761)
UbitUmarov (administrator)
2016-06-25 07:33

the restrictions where removed from code in 2012 with following comment:
"commented out redundant land owner checks for osTeleportAgent there is
no need for these checks just use Allow_osTeleportAgent = PARCEL_OWNER
also increased function to severe threat level to make it harder to
accidently enable it for everyone."
so im not checking at this point
(0030766)
UbitUmarov (administrator)
2016-06-25 10:36

I only shared some information i found about this issue...
(0030782)
Mandarinka Tasty (reporter)
2016-06-26 01:14
edited on: 2016-06-26 01:20

Hello again Ubit.

I do not want to change existing behaviour, I just offer enhancement of it.

Hence I have created variable = config option:


AllowRestrictedTeleportFunctions = false, so if user would like to use it

in actual way, then it does not require any action.

And if user wishes to use more restrictive setting, then it requires

only setting AllowRestrictedTeleportFunctions = true in config file.


What is your opinion about it ?

Please try my patch, that has been attached.

I'd be very grateful :)

Regards


- Issue History
Date Modified Username Field Change
2016-05-30 16:39 Mandarinka Tasty New Issue
2016-05-30 16:39 Mandarinka Tasty File Added: 0001-Fix-for-osTeleportAgent.patch
2016-05-30 16:39 Mandarinka Tasty Status new => patch included
2016-05-30 17:26 JeffKelley Note Added: 0030391
2016-05-30 17:43 Mandarinka Tasty Note Added: 0030392
2016-05-30 17:50 smxy Note Added: 0030393
2016-05-30 17:55 danbanner Note Added: 0030394
2016-05-30 18:04 Mandarinka Tasty Note Added: 0030395
2016-05-30 18:14 Mandarinka Tasty Note Added: 0030396
2016-05-30 18:20 Mandarinka Tasty Note Edited: 0030396 View Revisions
2016-05-30 18:37 smxy Note Added: 0030397
2016-05-30 19:35 melanie Note Added: 0030398
2016-05-30 23:57 Mandarinka Tasty File Deleted: 0001-Fix-for-osTeleportAgent.patch
2016-05-30 23:57 Mandarinka Tasty File Added: 0001-Fix-for-osTeleportAgent.patch
2016-05-31 00:10 Mandarinka Tasty Note Added: 0030401
2016-05-31 04:52 smxy Note Added: 0030402
2016-06-25 07:33 UbitUmarov Note Added: 0030761
2016-06-25 10:24 Mandarinka Tasty Note Added: 0030765
2016-06-25 10:36 UbitUmarov Note Added: 0030766
2016-06-26 01:14 Mandarinka Tasty Note Added: 0030782
2016-06-26 01:15 Mandarinka Tasty Note Deleted: 0030765
2016-06-26 01:20 Mandarinka Tasty Note Edited: 0030782 View Revisions


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker