Fix security so it correctly checks the OwnerUUID of an object which contains the script issuing a command
parent
1bdb12c558
commit
81b353c53c
|
@ -311,8 +311,19 @@ namespace Flocking
|
||||||
protected void SimChatSent (Object x, OSChatMessage msg)
|
protected void SimChatSent (Object x, OSChatMessage msg)
|
||||||
{
|
{
|
||||||
if (msg.Channel != m_chatChannel) return; // not for us
|
if (msg.Channel != m_chatChannel) return; // not for us
|
||||||
|
if (m_allowedControllers.Count > 0)
|
||||||
|
{
|
||||||
|
bool reject = true;
|
||||||
|
if (msg.SenderObject != null)
|
||||||
|
{
|
||||||
|
UUID ooUUID = ((SceneObjectPart)msg.SenderObject).OwnerID;
|
||||||
|
//m_log.InfoFormat("[{0}]: Message from object {1} with OwnerID: {2}", m_name, msg.SenderUUID, ooUUID);
|
||||||
|
if (m_allowedControllers.Contains(ooUUID)) reject = false;
|
||||||
|
}
|
||||||
|
if (m_allowedControllers.Contains(msg.SenderUUID)) reject = false;
|
||||||
|
|
||||||
if (m_allowedControllers.Count>0 & !m_allowedControllers.Contains(msg.SenderUUID)) return; // not for us
|
if (reject) return; //not for us
|
||||||
|
}
|
||||||
|
|
||||||
// try and parse a valid cmd from this msg
|
// try and parse a valid cmd from this msg
|
||||||
string cmd = msg.Message; //.ToLower ();
|
string cmd = msg.Message; //.ToLower ();
|
||||||
|
|
|
@ -125,6 +125,9 @@ which users are allowed to control the module using the 'BirdsAllowedControllers
|
||||||
but it may also contain one of the pre-defined constants ESTATE_OWNER (evaluates to the UUID of the estate owner) and ESTATE_MANAGER
|
but it may also contain one of the pre-defined constants ESTATE_OWNER (evaluates to the UUID of the estate owner) and ESTATE_MANAGER
|
||||||
(evaluates to a list of estate manager UUIDS).
|
(evaluates to a list of estate manager UUIDS).
|
||||||
|
|
||||||
|
* For commands sent from in-world chat, it is the UUID of the avatar sending the command that is checked against the list.
|
||||||
|
* For commands sent from a script it is the UUID of the owner of the prim in which the script resides that is checked against the list.
|
||||||
|
|
||||||
Bird prims:
|
Bird prims:
|
||||||
|
|
||||||
Any currently rezzed in-scene-object can be used as the bird prim. However fps is very much affected by the
|
Any currently rezzed in-scene-object can be used as the bird prim. However fps is very much affected by the
|
||||||
|
|
Loading…
Reference in New Issue