diff options
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 40 |
2 files changed, 38 insertions, 11 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 0ac427f..167e166 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -1604,8 +1604,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
1604 | } | 1604 | } |
1605 | else | 1605 | else |
1606 | { | 1606 | { |
1607 | if (!Permissions.CanTakeCopyObject(grp.UUID, remoteClient.AgentId)) | 1607 | if (action == DeRezAction.TakeCopy) |
1608 | { | ||
1609 | if (!Permissions.CanTakeCopyObject(grp.UUID, remoteClient.AgentId)) | ||
1610 | permissionToTakeCopy = false; | ||
1611 | } | ||
1612 | else | ||
1613 | { | ||
1608 | permissionToTakeCopy = false; | 1614 | permissionToTakeCopy = false; |
1615 | } | ||
1609 | if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId)) | 1616 | if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId)) |
1610 | permissionToTake = false; | 1617 | permissionToTake = false; |
1611 | 1618 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index fb191e6..d49bbb2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -9829,19 +9829,39 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9829 | public LSL_String llXorBase64StringsCorrect(string str1, string str2) | 9829 | public LSL_String llXorBase64StringsCorrect(string str1, string str2) |
9830 | { | 9830 | { |
9831 | m_host.AddScriptLPS(1); | 9831 | m_host.AddScriptLPS(1); |
9832 | string ret = String.Empty; | 9832 | |
9833 | string src1 = llBase64ToString(str1); | 9833 | if (str1 == String.Empty) |
9834 | string src2 = llBase64ToString(str2); | 9834 | return String.Empty; |
9835 | int c = 0; | 9835 | if (str2 == String.Empty) |
9836 | for (int i = 0; i < src1.Length; i++) | 9836 | return str1; |
9837 | |||
9838 | byte[] data1 = Convert.FromBase64String(str1); | ||
9839 | byte[] data2 = Convert.FromBase64String(str2); | ||
9840 | |||
9841 | byte[] d2 = new Byte[data1.Length]; | ||
9842 | int pos = 0; | ||
9843 | |||
9844 | if (data1.Length <= data2.Length) | ||
9837 | { | 9845 | { |
9838 | ret += (char) (src1[i] ^ src2[c]); | 9846 | Array.Copy(data2, 0, d2, 0, data1.Length); |
9847 | } | ||
9848 | else | ||
9849 | { | ||
9850 | while (pos < data1.Length) | ||
9851 | { | ||
9852 | int len = data1.Length - pos; | ||
9853 | if (len > data2.Length) | ||
9854 | len = data2.Length; | ||
9839 | 9855 | ||
9840 | c++; | 9856 | Array.Copy(data2, 0, d2, pos, len); |
9841 | if (c >= src2.Length) | 9857 | pos += len; |
9842 | c = 0; | 9858 | } |
9843 | } | 9859 | } |
9844 | return llStringToBase64(ret); | 9860 | |
9861 | for (pos = 0 ; pos < data1.Length ; pos++ ) | ||
9862 | data1[pos] ^= d2[pos]; | ||
9863 | |||
9864 | return Convert.ToBase64String(data1); | ||
9845 | } | 9865 | } |
9846 | 9866 | ||
9847 | public LSL_String llHTTPRequest(string url, LSL_List parameters, string body) | 9867 | public LSL_String llHTTPRequest(string url, LSL_List parameters, string body) |