Compare commits
29 Commits
master
...
0.8.1-post
Author | SHA1 | Date |
---|---|---|
Diva Canto | e09c8681ad | |
Diva Canto | eab6b3aee8 | |
Melanie Thielker | b24e177aac | |
Melanie Thielker | 7a9fbec3f5 | |
Melanie Thielker | 6b932f6a64 | |
Melanie Thielker | d9aa456175 | |
Diva Canto | fe92e025f4 | |
Justin Clark-Casey (justincc) | 593678a26b | |
Justin Clark-Casey (justincc) | c2500de0c7 | |
Robert Adams | d8642ff210 | |
Justin Clark-Casey (justincc) | 60889f139a | |
Justin Clark-Casey (justincc) | 4ac3d4a229 | |
Justin Clark-Casey (justincc) | 64fa2249f8 | |
Justin Clark-Casey (justincc) | 0e97633f71 | |
Justin Clark-Casey (justincc) | 63ccb54d40 | |
Justin Clark-Casey (justincc) | 7f5cf0f3c1 | |
Shy Robbiani | ad8d172079 | |
Justin Clark-Casey (justincc) | f03734710a | |
Justin Clark-Casey (justincc) | d2b4b99263 | |
Justin Clark-Casey (justincc) | c8cc768c85 | |
Justin Clark-Casey (justincc) | 33a14f358b | |
Freaky Tech | bea2569b6d | |
Justin Clark-Casey (justincc) | a4f6cef832 | |
Justin Clark-Casey (justincc) | 86d4724e24 | |
Justin Clark-Casey (justincc) | 56dcb4e283 | |
Justin Clark-Casey (justincc) | 1a185a048b | |
AliciaRaven | 14a3375bed | |
Justin Clark-Casey (justincc) | b8c7175d34 | |
Justin Clark-Casey (justincc) | 144f1400c5 |
|
@ -166,6 +166,7 @@ what it is today.
|
||||||
* Salahzar Stenvaag
|
* Salahzar Stenvaag
|
||||||
* satguru p srivastava
|
* satguru p srivastava
|
||||||
* sempuki
|
* sempuki
|
||||||
|
* Shy Robbiani
|
||||||
* SignpostMarv
|
* SignpostMarv
|
||||||
* SpotOn3D
|
* SpotOn3D
|
||||||
* Stefan_Boom / stoehr
|
* Stefan_Boom / stoehr
|
||||||
|
|
|
@ -458,7 +458,10 @@ namespace OpenSim.Framework
|
||||||
// m_log.WarnFormat("[AVATARAPPEARANCE] set wearable {0} --> {1}:{2}",wearableId,wearable.ItemID,wearable.AssetID);
|
// m_log.WarnFormat("[AVATARAPPEARANCE] set wearable {0} --> {1}:{2}",wearableId,wearable.ItemID,wearable.AssetID);
|
||||||
// DEBUG OFF
|
// DEBUG OFF
|
||||||
m_wearables[wearableId].Clear();
|
m_wearables[wearableId].Clear();
|
||||||
for (int i = 0; i < wearable.Count; i++)
|
int count = wearable.Count;
|
||||||
|
if (count > AvatarWearable.MAX_WEARABLES)
|
||||||
|
count = AvatarWearable.MAX_WEARABLES;
|
||||||
|
for (int i = 0; i < count; i++)
|
||||||
m_wearables[wearableId].Add(wearable[i].ItemID, wearable[i].AssetID);
|
m_wearables[wearableId].Add(wearable[i].ItemID, wearable[i].AssetID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,256 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the OpenSimulator Project nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using System.Reflection;
|
||||||
|
using log4net;
|
||||||
|
using LukeSkywalker.IPNetwork;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
|
namespace OpenSim.Framework.Communications
|
||||||
|
{
|
||||||
|
public class OutboundUrlFilter
|
||||||
|
{
|
||||||
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
public string Name { get; private set; }
|
||||||
|
|
||||||
|
private List<IPNetwork> m_blacklistNetworks;
|
||||||
|
private List<IPEndPoint> m_blacklistEndPoints;
|
||||||
|
|
||||||
|
private List<IPNetwork> m_blacklistExceptionNetworks;
|
||||||
|
private List<IPEndPoint> m_blacklistExceptionEndPoints;
|
||||||
|
|
||||||
|
public OutboundUrlFilter(
|
||||||
|
string name,
|
||||||
|
List<IPNetwork> blacklistNetworks, List<IPEndPoint> blacklistEndPoints,
|
||||||
|
List<IPNetwork> blacklistExceptionNetworks, List<IPEndPoint> blacklistExceptionEndPoints)
|
||||||
|
{
|
||||||
|
Name = name;
|
||||||
|
|
||||||
|
m_blacklistNetworks = blacklistNetworks;
|
||||||
|
m_blacklistEndPoints = blacklistEndPoints;
|
||||||
|
m_blacklistExceptionNetworks = blacklistExceptionNetworks;
|
||||||
|
m_blacklistExceptionEndPoints = blacklistExceptionEndPoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="OpenSim.Framework.Communications.OutboundUrlFilter"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name">Name of the filter for logging purposes.</param>
|
||||||
|
/// <param name="config">Filter configuration</param>
|
||||||
|
public OutboundUrlFilter(string name, IConfigSource config)
|
||||||
|
{
|
||||||
|
Name = name;
|
||||||
|
|
||||||
|
string configBlacklist
|
||||||
|
= "0.0.0.0/8|10.0.0.0/8|100.64.0.0/10|127.0.0.0/8|169.254.0.0/16|172.16.0.0/12|192.0.0.0/24|192.0.2.0/24|192.88.99.0/24|192.168.0.0/16|198.18.0.0/15|198.51.100.0/24|203.0.113.0/24|224.0.0.0/4|240.0.0.0/4|255.255.255.255/32";
|
||||||
|
string configBlacklistExceptions = "";
|
||||||
|
|
||||||
|
IConfig networkConfig = config.Configs["Network"];
|
||||||
|
|
||||||
|
if (networkConfig != null)
|
||||||
|
{
|
||||||
|
configBlacklist = networkConfig.GetString("OutboundDisallowForUserScripts", configBlacklist);
|
||||||
|
configBlacklistExceptions
|
||||||
|
= networkConfig.GetString("OutboundDisallowForUserScriptsExcept", configBlacklistExceptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_log.DebugFormat(
|
||||||
|
"[OUTBOUND URL FILTER]: OutboundDisallowForUserScripts for {0} is [{1}]", Name, configBlacklist);
|
||||||
|
m_log.DebugFormat(
|
||||||
|
"[OUTBOUND URL FILTER]: OutboundDisallowForUserScriptsExcept for {0} is [{1}]", Name, configBlacklistExceptions);
|
||||||
|
|
||||||
|
OutboundUrlFilter.ParseConfigList(
|
||||||
|
configBlacklist, Name, out m_blacklistNetworks, out m_blacklistEndPoints);
|
||||||
|
OutboundUrlFilter.ParseConfigList(
|
||||||
|
configBlacklistExceptions, Name, out m_blacklistExceptionNetworks, out m_blacklistExceptionEndPoints);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void ParseConfigList(
|
||||||
|
string fullConfigEntry, string filterName, out List<IPNetwork> networks, out List<IPEndPoint> endPoints)
|
||||||
|
{
|
||||||
|
// Parse blacklist
|
||||||
|
string[] configBlacklistEntries
|
||||||
|
= fullConfigEntry.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
|
||||||
|
configBlacklistEntries = configBlacklistEntries.Select(e => e.Trim()).ToArray();
|
||||||
|
|
||||||
|
networks = new List<IPNetwork>();
|
||||||
|
endPoints = new List<IPEndPoint>();
|
||||||
|
|
||||||
|
foreach (string configEntry in configBlacklistEntries)
|
||||||
|
{
|
||||||
|
if (configEntry.Contains("/"))
|
||||||
|
{
|
||||||
|
IPNetwork network;
|
||||||
|
|
||||||
|
if (!IPNetwork.TryParse(configEntry, out network))
|
||||||
|
{
|
||||||
|
m_log.ErrorFormat(
|
||||||
|
"[OUTBOUND URL FILTER]: Entry [{0}] is invalid network for {1}", configEntry, filterName);
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
networks.Add(network);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Uri configEntryUri;
|
||||||
|
|
||||||
|
if (!Uri.TryCreate("http://" + configEntry, UriKind.Absolute, out configEntryUri))
|
||||||
|
{
|
||||||
|
m_log.ErrorFormat(
|
||||||
|
"[OUTBOUND URL FILTER]: EndPoint entry [{0}] is invalid endpoint for {1}",
|
||||||
|
configEntry, filterName);
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
IPAddress[] addresses = Dns.GetHostAddresses(configEntryUri.Host);
|
||||||
|
|
||||||
|
foreach (IPAddress addr in addresses)
|
||||||
|
{
|
||||||
|
if (addr.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
|
||||||
|
{
|
||||||
|
// m_log.DebugFormat("[OUTBOUND URL FILTER]: Found address [{0}] in config", addr);
|
||||||
|
|
||||||
|
IPEndPoint configEntryEp = new IPEndPoint(addr, configEntryUri.Port);
|
||||||
|
endPoints.Add(configEntryEp);
|
||||||
|
|
||||||
|
// m_log.DebugFormat("[OUTBOUND URL FILTER]: Added blacklist exception [{0}]", configEntryEp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Determines if an url is in a list of networks and endpoints.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <param name="url">IP address</param>
|
||||||
|
/// <param name="port"></param>
|
||||||
|
/// <param name="networks">Networks.</param>
|
||||||
|
/// <param name="endPoints">End points.</param>
|
||||||
|
/// <param name="filterName">Filter name.</param>
|
||||||
|
private static bool IsInNetwork(
|
||||||
|
IPAddress addr, int port, List<IPNetwork> networks, List<IPEndPoint> endPoints, string filterName)
|
||||||
|
{
|
||||||
|
foreach (IPNetwork ipn in networks)
|
||||||
|
{
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[OUTBOUND URL FILTER]: Checking [{0}] against network [{1}]", addr, ipn);
|
||||||
|
|
||||||
|
if (IPNetwork.Contains(ipn, addr))
|
||||||
|
{
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[OUTBOUND URL FILTER]: Found [{0}] in network [{1}]", addr, ipn);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// m_log.DebugFormat("[OUTBOUND URL FILTER]: Found address [{0}]", addr);
|
||||||
|
|
||||||
|
foreach (IPEndPoint ep in endPoints)
|
||||||
|
{
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[OUTBOUND URL FILTER]: Checking [{0}:{1}] against endpoint [{2}]",
|
||||||
|
// addr, port, ep);
|
||||||
|
|
||||||
|
if (addr.Equals(ep.Address) && port == ep.Port)
|
||||||
|
{
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[OUTBOUND URL FILTER]: Found [{0}:{1}] in endpoint [{2}]", addr, port, ep);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// m_log.DebugFormat("[OUTBOUND URL FILTER]: Did not find [{0}:{1}] in list", addr, port);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Checks whether the given url is allowed by the filter.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public bool CheckAllowed(Uri url)
|
||||||
|
{
|
||||||
|
bool allowed = true;
|
||||||
|
|
||||||
|
// Check that we are permitted to make calls to this endpoint.
|
||||||
|
bool foundIpv4Address = false;
|
||||||
|
|
||||||
|
IPAddress[] addresses = Dns.GetHostAddresses(url.Host);
|
||||||
|
|
||||||
|
foreach (IPAddress addr in addresses)
|
||||||
|
{
|
||||||
|
if (addr.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
|
||||||
|
{
|
||||||
|
// m_log.DebugFormat("[OUTBOUND URL FILTER]: Found address [{0}]", addr);
|
||||||
|
|
||||||
|
foundIpv4Address = true;
|
||||||
|
|
||||||
|
// Check blacklist
|
||||||
|
if (OutboundUrlFilter.IsInNetwork(addr, url.Port, m_blacklistNetworks, m_blacklistEndPoints, Name))
|
||||||
|
{
|
||||||
|
// m_log.DebugFormat("[OUTBOUND URL FILTER]: Found [{0}] in blacklist for {1}", url, Name);
|
||||||
|
|
||||||
|
// Check blacklist exceptions
|
||||||
|
allowed
|
||||||
|
= OutboundUrlFilter.IsInNetwork(
|
||||||
|
addr, url.Port, m_blacklistExceptionNetworks, m_blacklistExceptionEndPoints, Name);
|
||||||
|
|
||||||
|
// if (allowed)
|
||||||
|
// m_log.DebugFormat("[OUTBOUND URL FILTER]: Found [{0}] in whitelist for {1}", url, Name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Found at least one address in a blacklist and not a blacklist exception
|
||||||
|
if (!allowed)
|
||||||
|
return false;
|
||||||
|
// else
|
||||||
|
// m_log.DebugFormat("[OUTBOUND URL FILTER]: URL [{0}] not in blacklist for {1}", url, Name);
|
||||||
|
}
|
||||||
|
|
||||||
|
// We do not know how to handle IPv6 securely yet.
|
||||||
|
if (!foundIpv4Address)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// m_log.DebugFormat("[OUTBOUND URL FILTER]: Allowing request [{0}]", url);
|
||||||
|
|
||||||
|
return allowed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -823,12 +823,14 @@ namespace OpenSim.Framework
|
||||||
string location = String.Format("{0},{1}", RegionLocX, RegionLocY);
|
string location = String.Format("{0},{1}", RegionLocX, RegionLocY);
|
||||||
config.Set("Location", location);
|
config.Set("Location", location);
|
||||||
|
|
||||||
if (RegionSizeX != Constants.RegionSize || RegionSizeY != Constants.RegionSize)
|
if (RegionSizeX > 0)
|
||||||
{
|
|
||||||
config.Set("SizeX", RegionSizeX);
|
config.Set("SizeX", RegionSizeX);
|
||||||
|
|
||||||
|
if (RegionSizeY > 0)
|
||||||
config.Set("SizeY", RegionSizeY);
|
config.Set("SizeY", RegionSizeY);
|
||||||
|
|
||||||
|
// if (RegionSizeZ > 0)
|
||||||
// config.Set("SizeZ", RegionSizeZ);
|
// config.Set("SizeZ", RegionSizeZ);
|
||||||
}
|
|
||||||
|
|
||||||
config.Set("InternalAddress", m_internalEndPoint.Address.ToString());
|
config.Set("InternalAddress", m_internalEndPoint.Address.ToString());
|
||||||
config.Set("InternalPort", m_internalEndPoint.Port);
|
config.Set("InternalPort", m_internalEndPoint.Port);
|
||||||
|
@ -872,7 +874,7 @@ namespace OpenSim.Framework
|
||||||
if (m_maptileStaticUUID != UUID.Zero)
|
if (m_maptileStaticUUID != UUID.Zero)
|
||||||
config.Set("MaptileStaticUUID", m_maptileStaticUUID.ToString());
|
config.Set("MaptileStaticUUID", m_maptileStaticUUID.ToString());
|
||||||
|
|
||||||
if (MaptileStaticFile != String.Empty)
|
if (MaptileStaticFile != null && MaptileStaticFile != String.Empty)
|
||||||
config.Set("MaptileStaticFile", MaptileStaticFile);
|
config.Set("MaptileStaticFile", MaptileStaticFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,13 +56,18 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
RequestsReceived++;
|
RequestsReceived++;
|
||||||
if (m_Auth != null && !m_Auth.Authenticate(httpRequest.Headers, httpResponse.AddHeader))
|
|
||||||
{
|
|
||||||
|
|
||||||
httpResponse.StatusCode = (int)HttpStatusCode.Unauthorized;
|
if (m_Auth != null)
|
||||||
|
{
|
||||||
|
HttpStatusCode statusCode;
|
||||||
|
|
||||||
|
if (!m_Auth.Authenticate(httpRequest.Headers, httpResponse.AddHeader, out statusCode))
|
||||||
|
{
|
||||||
|
httpResponse.StatusCode = (int)statusCode;
|
||||||
httpResponse.ContentType = "text/plain";
|
httpResponse.ContentType = "text/plain";
|
||||||
return new byte[0];
|
return new byte[0];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
byte[] result = ProcessRequest(path, request, httpRequest, httpResponse);
|
byte[] result = ProcessRequest(path, request, httpRequest, httpResponse);
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
|
using System.Net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
|
@ -82,11 +83,10 @@ namespace OpenSim.Framework.ServiceAuth
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Authenticate(NameValueCollection requestHeaders, AddHeaderDelegate d)
|
public bool Authenticate(NameValueCollection requestHeaders, AddHeaderDelegate d, out HttpStatusCode statusCode)
|
||||||
{
|
|
||||||
//m_log.DebugFormat("[HTTP BASIC AUTH]: Authenticate in {0}", remove_me);
|
|
||||||
if (requestHeaders != null)
|
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat("[HTTP BASIC AUTH]: Authenticate in {0}", "BasicHttpAuthentication");
|
||||||
|
|
||||||
string value = requestHeaders.Get("Authorization");
|
string value = requestHeaders.Get("Authorization");
|
||||||
if (value != null)
|
if (value != null)
|
||||||
{
|
{
|
||||||
|
@ -95,11 +95,16 @@ namespace OpenSim.Framework.ServiceAuth
|
||||||
{
|
{
|
||||||
value = value.Replace("Basic ", string.Empty);
|
value = value.Replace("Basic ", string.Empty);
|
||||||
if (Authenticate(value))
|
if (Authenticate(value))
|
||||||
|
{
|
||||||
|
statusCode = HttpStatusCode.OK;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
d("WWW-Authenticate", "Basic realm = \"Asset Server\"");
|
d("WWW-Authenticate", "Basic realm = \"Asset Server\"");
|
||||||
|
|
||||||
|
statusCode = HttpStatusCode.Unauthorized;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the OpenSimulator Project nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.Specialized;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
|
namespace OpenSim.Framework.ServiceAuth
|
||||||
|
{
|
||||||
|
public class CompoundAuthentication : IServiceAuth
|
||||||
|
{
|
||||||
|
private List<IServiceAuth> m_authentications = new List<IServiceAuth>();
|
||||||
|
|
||||||
|
public int Count { get { return m_authentications.Count; } }
|
||||||
|
|
||||||
|
public void AddAuthenticator(IServiceAuth auth)
|
||||||
|
{
|
||||||
|
m_authentications.Add(auth);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveAuthenticator(IServiceAuth auth)
|
||||||
|
{
|
||||||
|
m_authentications.Remove(auth);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddAuthorization(NameValueCollection headers) {}
|
||||||
|
|
||||||
|
public bool Authenticate(string data)
|
||||||
|
{
|
||||||
|
return m_authentications.TrueForAll(a => a.Authenticate(data));
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Authenticate(NameValueCollection requestHeaders, AddHeaderDelegate d, out HttpStatusCode statusCode)
|
||||||
|
{
|
||||||
|
foreach (IServiceAuth auth in m_authentications)
|
||||||
|
{
|
||||||
|
if (!auth.Authenticate(requestHeaders, d, out statusCode))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
statusCode = HttpStatusCode.OK;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,57 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the OpenSimulator Project nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Specialized;
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
|
namespace OpenSim.Framework.ServiceAuth
|
||||||
|
{
|
||||||
|
public class DisallowLlHttpRequest : IServiceAuth
|
||||||
|
{
|
||||||
|
public void AddAuthorization(NameValueCollection headers) {}
|
||||||
|
|
||||||
|
public bool Authenticate(string data)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Authenticate(NameValueCollection requestHeaders, AddHeaderDelegate d, out HttpStatusCode statusCode)
|
||||||
|
{
|
||||||
|
// Console.WriteLine("DisallowLlHttpRequest");
|
||||||
|
|
||||||
|
if (requestHeaders["X-SecondLife-Shard"] != null)
|
||||||
|
{
|
||||||
|
statusCode = HttpStatusCode.Forbidden;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
statusCode = HttpStatusCode.OK;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -26,6 +26,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Net;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
|
|
||||||
|
@ -36,7 +37,7 @@ namespace OpenSim.Framework.ServiceAuth
|
||||||
public interface IServiceAuth
|
public interface IServiceAuth
|
||||||
{
|
{
|
||||||
bool Authenticate(string data);
|
bool Authenticate(string data);
|
||||||
bool Authenticate(NameValueCollection headers, AddHeaderDelegate d);
|
bool Authenticate(NameValueCollection headers, AddHeaderDelegate d, out HttpStatusCode statusCode);
|
||||||
void AddAuthorization(NameValueCollection headers);
|
void AddAuthorization(NameValueCollection headers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,14 +36,26 @@ namespace OpenSim.Framework.ServiceAuth
|
||||||
{
|
{
|
||||||
public static IServiceAuth Create(IConfigSource config, string section)
|
public static IServiceAuth Create(IConfigSource config, string section)
|
||||||
{
|
{
|
||||||
|
CompoundAuthentication compoundAuth = new CompoundAuthentication();
|
||||||
|
|
||||||
|
bool allowLlHttpRequestIn
|
||||||
|
= Util.GetConfigVarFromSections<bool>(config, "AllowllHTTPRequestIn", new string[] { "Network", section }, false);
|
||||||
|
|
||||||
|
if (!allowLlHttpRequestIn)
|
||||||
|
compoundAuth.AddAuthenticator(new DisallowLlHttpRequest());
|
||||||
|
|
||||||
string authType = Util.GetConfigVarFromSections<string>(config, "AuthType", new string[] { "Network", section }, "None");
|
string authType = Util.GetConfigVarFromSections<string>(config, "AuthType", new string[] { "Network", section }, "None");
|
||||||
|
|
||||||
switch (authType)
|
switch (authType)
|
||||||
{
|
{
|
||||||
case "BasicHttpAuthentication":
|
case "BasicHttpAuthentication":
|
||||||
return new BasicHttpAuthentication(config, section);
|
compoundAuth.AddAuthenticator(new BasicHttpAuthentication(config, section));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (compoundAuth.Count > 0)
|
||||||
|
return compoundAuth;
|
||||||
|
else
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,8 +29,8 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
public class VersionInfo
|
public class VersionInfo
|
||||||
{
|
{
|
||||||
public const string VersionNumber = "0.8.1.0";
|
public const string VersionNumber = "0.8.1.2";
|
||||||
private const Flavour VERSION_FLAVOUR = Flavour.Dev;
|
private const Flavour VERSION_FLAVOUR = Flavour.Post_Fixes;
|
||||||
|
|
||||||
public enum Flavour
|
public enum Flavour
|
||||||
{
|
{
|
||||||
|
@ -71,6 +71,6 @@ namespace OpenSim
|
||||||
/// of the code that is too old.
|
/// of the code that is too old.
|
||||||
///
|
///
|
||||||
/// </value>
|
/// </value>
|
||||||
public readonly static int MajorInterfaceVersion = 7;
|
public readonly static int MajorInterfaceVersion = 8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -385,7 +385,7 @@ namespace OpenSim
|
||||||
|
|
||||||
m_console.Commands.AddCommand("Regions", false, "restart",
|
m_console.Commands.AddCommand("Regions", false, "restart",
|
||||||
"restart",
|
"restart",
|
||||||
"Restart all sims in this instance",
|
"Restart the currently selected region(s) in this instance",
|
||||||
RunCommand);
|
RunCommand);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("General", false, "command-script",
|
m_console.Commands.AddCommand("General", false, "command-script",
|
||||||
|
@ -732,6 +732,8 @@ namespace OpenSim
|
||||||
|
|
||||||
if (changed)
|
if (changed)
|
||||||
m_estateDataService.StoreEstateSettings(regInfo.EstateSettings);
|
m_estateDataService.StoreEstateSettings(regInfo.EstateSettings);
|
||||||
|
|
||||||
|
scene.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -835,7 +835,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
if (versionComponents.Length >= 2)
|
if (versionComponents.Length >= 2)
|
||||||
float.TryParse(versionComponents[1], out versionNumber);
|
float.TryParse(versionComponents[1], out versionNumber);
|
||||||
|
|
||||||
if (versionNumber >= 0.2f && MaxOutgoingTransferVersion >= versionNumber)
|
if (versionNumber >= 0.2f)
|
||||||
TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason);
|
TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason);
|
||||||
else
|
else
|
||||||
TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason);
|
TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason);
|
||||||
|
|
|
@ -199,12 +199,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
|
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
{
|
{
|
||||||
//Console.WriteLine("Depth: {0}", reader.Depth);
|
// Console.WriteLine("Depth: {0}, name {1}", reader.Depth, reader.Name);
|
||||||
|
|
||||||
switch (reader.NodeType)
|
switch (reader.NodeType)
|
||||||
{
|
{
|
||||||
case XmlNodeType.Attribute:
|
case XmlNodeType.Attribute:
|
||||||
writer.WriteAttributeString(reader.Prefix, reader.Name, reader.NamespaceURI, reader.Value);
|
// Console.WriteLine("FOUND ATTRIBUTE {0}", reader.Name);
|
||||||
|
writer.WriteAttributeString(reader.Name, reader.Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case XmlNodeType.CDATA:
|
case XmlNodeType.CDATA:
|
||||||
|
@ -224,6 +225,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
|
|
||||||
writer.WriteStartElement(reader.Prefix, reader.LocalName, reader.NamespaceURI);
|
writer.WriteStartElement(reader.Prefix, reader.LocalName, reader.NamespaceURI);
|
||||||
|
|
||||||
|
if (reader.HasAttributes)
|
||||||
|
{
|
||||||
|
while (reader.MoveToNextAttribute())
|
||||||
|
writer.WriteAttributeString(reader.Name, reader.Value);
|
||||||
|
|
||||||
|
reader.MoveToElement();
|
||||||
|
}
|
||||||
|
|
||||||
if (reader.LocalName == "SceneObjectPart")
|
if (reader.LocalName == "SceneObjectPart")
|
||||||
{
|
{
|
||||||
if (sopDepth < 0)
|
if (sopDepth < 0)
|
||||||
|
|
|
@ -26,12 +26,15 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Threading;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
using Nini.Config;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.CoreModules.Framework.InventoryAccess;
|
using OpenSim.Region.CoreModules.Framework.InventoryAccess;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
using OpenSim.Region.ScriptEngine.XEngine;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
using OpenSim.Tests.Common;
|
using OpenSim.Tests.Common;
|
||||||
|
|
||||||
|
@ -46,30 +49,54 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
|
||||||
TestHelpers.InMethod();
|
TestHelpers.InMethod();
|
||||||
// TestHelpers.EnableLogging();
|
// TestHelpers.EnableLogging();
|
||||||
|
|
||||||
|
XEngine xengine = new OpenSim.Region.ScriptEngine.XEngine.XEngine();
|
||||||
|
xengine.DebugLevel = 1;
|
||||||
|
|
||||||
|
IniConfigSource configSource = new IniConfigSource();
|
||||||
|
|
||||||
|
IConfig startupConfig = configSource.AddConfig("Startup");
|
||||||
|
startupConfig.Set("DefaultScriptEngine", "XEngine");
|
||||||
|
|
||||||
|
IConfig xEngineConfig = configSource.AddConfig("XEngine");
|
||||||
|
xEngineConfig.Set("Enabled", "true");
|
||||||
|
xEngineConfig.Set("StartDelay", "0");
|
||||||
|
xEngineConfig.Set("AppDomainLoading", "false");
|
||||||
|
|
||||||
string homeUrl = "http://hg.HomeTestPostAssetRewriteGrid.com";
|
string homeUrl = "http://hg.HomeTestPostAssetRewriteGrid.com";
|
||||||
string foreignUrl = "http://hg.ForeignTestPostAssetRewriteGrid.com";
|
string foreignUrl = "http://hg.ForeignTestPostAssetRewriteGrid.com";
|
||||||
UUID assetId = TestHelpers.ParseTail(0x1);
|
int soIdTail = 0x1;
|
||||||
UUID userId = TestHelpers.ParseTail(0x10);
|
UUID assetId = TestHelpers.ParseTail(0x10);
|
||||||
|
UUID userId = TestHelpers.ParseTail(0x100);
|
||||||
|
UUID sceneId = TestHelpers.ParseTail(0x1000);
|
||||||
string userFirstName = "TestPostAsset";
|
string userFirstName = "TestPostAsset";
|
||||||
string userLastName = "Rewrite";
|
string userLastName = "Rewrite";
|
||||||
int soPartsCount = 3;
|
int soPartsCount = 3;
|
||||||
|
|
||||||
Scene scene = new SceneHelpers().SetupScene();
|
Scene scene = new SceneHelpers().SetupScene("TestPostAssetRewriteScene", sceneId, 1000, 1000, configSource);
|
||||||
|
SceneHelpers.SetupSceneModules(scene, configSource, xengine);
|
||||||
|
scene.StartScripts();
|
||||||
|
|
||||||
HGAssetMapper hgam = new HGAssetMapper(scene, homeUrl);
|
HGAssetMapper hgam = new HGAssetMapper(scene, homeUrl);
|
||||||
UserAccount ua
|
UserAccount ua
|
||||||
= UserAccountHelpers.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "password");
|
= UserAccountHelpers.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "password");
|
||||||
|
|
||||||
//AssetBase ncAssetSet = AssetHelpers.CreateNotecardAsset(assetId, "TestPostAssetRewriteNotecard");
|
SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, soPartsCount, ua.PrincipalID, "part", soIdTail);
|
||||||
SceneObjectGroup so = SceneHelpers.CreateSceneObject(soPartsCount, ua.PrincipalID);
|
RezScript(
|
||||||
AssetBase ncAssetSet = AssetHelpers.CreateAsset(assetId, so);
|
scene, so.UUID, "default { state_entry() { llSay(0, \"Hello World\"); } }", "item1", ua.PrincipalID);
|
||||||
ncAssetSet.CreatorID = foreignUrl;
|
|
||||||
hgam.PostAsset(foreignUrl, ncAssetSet);
|
|
||||||
|
|
||||||
|
AssetBase asset = AssetHelpers.CreateAsset(assetId, so);
|
||||||
|
asset.CreatorID = foreignUrl;
|
||||||
|
hgam.PostAsset(foreignUrl, asset);
|
||||||
|
|
||||||
|
// Check transformed asset.
|
||||||
AssetBase ncAssetGet = scene.AssetService.Get(assetId.ToString());
|
AssetBase ncAssetGet = scene.AssetService.Get(assetId.ToString());
|
||||||
Assert.AreEqual(foreignUrl, ncAssetGet.CreatorID);
|
Assert.AreEqual(foreignUrl, ncAssetGet.CreatorID);
|
||||||
string xmlData = Utils.BytesToString(ncAssetGet.Data);
|
string xmlData = Utils.BytesToString(ncAssetGet.Data);
|
||||||
XmlDocument ncAssetGetXmlDoc = new XmlDocument();
|
XmlDocument ncAssetGetXmlDoc = new XmlDocument();
|
||||||
ncAssetGetXmlDoc.LoadXml(xmlData);
|
ncAssetGetXmlDoc.LoadXml(xmlData);
|
||||||
|
|
||||||
|
// Console.WriteLine(ncAssetGetXmlDoc.OuterXml);
|
||||||
|
|
||||||
XmlNodeList creatorDataNodes = ncAssetGetXmlDoc.GetElementsByTagName("CreatorData");
|
XmlNodeList creatorDataNodes = ncAssetGetXmlDoc.GetElementsByTagName("CreatorData");
|
||||||
|
|
||||||
Assert.AreEqual(soPartsCount, creatorDataNodes.Count);
|
Assert.AreEqual(soPartsCount, creatorDataNodes.Count);
|
||||||
|
@ -80,6 +107,40 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
|
||||||
Assert.AreEqual(
|
Assert.AreEqual(
|
||||||
string.Format("{0};{1} {2}", homeUrl, ua.FirstName, ua.LastName), creatorDataNode.InnerText);
|
string.Format("{0};{1} {2}", homeUrl, ua.FirstName, ua.LastName), creatorDataNode.InnerText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check that saved script nodes have attributes
|
||||||
|
XmlNodeList savedScriptStateNodes = ncAssetGetXmlDoc.GetElementsByTagName("SavedScriptState");
|
||||||
|
|
||||||
|
Assert.AreEqual(1, savedScriptStateNodes.Count);
|
||||||
|
Assert.AreEqual(1, savedScriptStateNodes[0].Attributes.Count);
|
||||||
|
XmlNode uuidAttribute = savedScriptStateNodes[0].Attributes.GetNamedItem("UUID");
|
||||||
|
Assert.NotNull(uuidAttribute);
|
||||||
|
// XXX: To check the actual UUID attribute we would have to do some work to retreive the UUID of the task
|
||||||
|
// item created earlier.
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RezScript(Scene scene, UUID soId, string script, string itemName, UUID userId)
|
||||||
|
{
|
||||||
|
InventoryItemBase itemTemplate = new InventoryItemBase();
|
||||||
|
// itemTemplate.ID = itemId;
|
||||||
|
itemTemplate.Name = itemName;
|
||||||
|
itemTemplate.Folder = soId;
|
||||||
|
itemTemplate.InvType = (int)InventoryType.LSL;
|
||||||
|
|
||||||
|
// XXX: Ultimately it would be better to be able to directly manipulate the script engine to rez a script
|
||||||
|
// immediately for tests rather than chunter through it's threaded mechanisms.
|
||||||
|
AutoResetEvent chatEvent = new AutoResetEvent(false);
|
||||||
|
|
||||||
|
scene.EventManager.OnChatFromWorld += (s, c) =>
|
||||||
|
{
|
||||||
|
// Console.WriteLine("Got chat [{0}]", c.Message);
|
||||||
|
chatEvent.Set();
|
||||||
|
};
|
||||||
|
|
||||||
|
scene.RezNewScript(userId, itemTemplate, script);
|
||||||
|
|
||||||
|
// Console.WriteLine("HERE");
|
||||||
|
Assert.IsTrue(chatEvent.WaitOne(60000), "Chat event in HGAssetMapperTests.RezScript not received");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -40,6 +40,7 @@ using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
using OpenSim.Framework.Communications;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Framework.Servers.HttpServer;
|
using OpenSim.Framework.Servers.HttpServer;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
|
@ -94,10 +95,13 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "HttpRequestModule")]
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "HttpRequestModule")]
|
||||||
public class HttpRequestModule : ISharedRegionModule, IHttpRequestModule
|
public class HttpRequestModule : ISharedRegionModule, IHttpRequestModule
|
||||||
{
|
{
|
||||||
|
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private object HttpListLock = new object();
|
private object HttpListLock = new object();
|
||||||
private int httpTimeout = 30000;
|
private int httpTimeout = 30000;
|
||||||
private string m_name = "HttpScriptRequests";
|
private string m_name = "HttpScriptRequests";
|
||||||
|
|
||||||
|
private OutboundUrlFilter m_outboundUrlFilter;
|
||||||
private string m_proxyurl = "";
|
private string m_proxyurl = "";
|
||||||
private string m_proxyexcepts = "";
|
private string m_proxyexcepts = "";
|
||||||
|
|
||||||
|
@ -156,7 +160,9 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||||
return UUID.Zero;
|
return UUID.Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UUID StartHttpRequest(uint localID, UUID itemID, string url, List<string> parameters, Dictionary<string, string> headers, string body)
|
public UUID StartHttpRequest(
|
||||||
|
uint localID, UUID itemID, string url, List<string> parameters, Dictionary<string, string> headers, string body,
|
||||||
|
out HttpInitialRequestStatus status)
|
||||||
{
|
{
|
||||||
UUID reqID = UUID.Random();
|
UUID reqID = UUID.Random();
|
||||||
HttpRequestClass htc = new HttpRequestClass();
|
HttpRequestClass htc = new HttpRequestClass();
|
||||||
|
@ -233,6 +239,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
htc.RequestModule = this;
|
||||||
htc.LocalID = localID;
|
htc.LocalID = localID;
|
||||||
htc.ItemID = itemID;
|
htc.ItemID = itemID;
|
||||||
htc.Url = url;
|
htc.Url = url;
|
||||||
|
@ -243,14 +250,43 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||||
htc.proxyurl = m_proxyurl;
|
htc.proxyurl = m_proxyurl;
|
||||||
htc.proxyexcepts = m_proxyexcepts;
|
htc.proxyexcepts = m_proxyexcepts;
|
||||||
|
|
||||||
lock (HttpListLock)
|
// Same number as default HttpWebRequest.MaximumAutomaticRedirections
|
||||||
|
htc.MaxRedirects = 50;
|
||||||
|
|
||||||
|
if (StartHttpRequest(htc))
|
||||||
{
|
{
|
||||||
m_pendingRequests.Add(reqID, htc);
|
status = HttpInitialRequestStatus.OK;
|
||||||
|
return htc.ReqID;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
status = HttpInitialRequestStatus.DISALLOWED_BY_FILTER;
|
||||||
|
return UUID.Zero;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
htc.Process();
|
/// <summary>
|
||||||
|
/// Would a caller to this module be allowed to make a request to the given URL?
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public bool CheckAllowed(Uri url)
|
||||||
|
{
|
||||||
|
return m_outboundUrlFilter.CheckAllowed(url);
|
||||||
|
}
|
||||||
|
|
||||||
return reqID;
|
public bool StartHttpRequest(HttpRequestClass req)
|
||||||
|
{
|
||||||
|
if (!CheckAllowed(new Uri(req.Url)))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
lock (HttpListLock)
|
||||||
|
{
|
||||||
|
m_pendingRequests.Add(req.ReqID, req);
|
||||||
|
}
|
||||||
|
|
||||||
|
req.Process();
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StopHttpRequestsForScript(UUID id)
|
public void StopHttpRequestsForScript(UUID id)
|
||||||
|
@ -326,6 +362,8 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||||
m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
|
m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
|
||||||
m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
|
m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
|
||||||
|
|
||||||
|
m_outboundUrlFilter = new OutboundUrlFilter("Script HTTP request module", config);
|
||||||
|
|
||||||
m_pendingRequests = new Dictionary<UUID, HttpRequestClass>();
|
m_pendingRequests = new Dictionary<UUID, HttpRequestClass>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -380,6 +418,12 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||||
// public const int HTTP_VERBOSE_THROTTLE = 4;
|
// public const int HTTP_VERBOSE_THROTTLE = 4;
|
||||||
// public const int HTTP_CUSTOM_HEADER = 5;
|
// public const int HTTP_CUSTOM_HEADER = 5;
|
||||||
// public const int HTTP_PRAGMA_NO_CACHE = 6;
|
// public const int HTTP_PRAGMA_NO_CACHE = 6;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Module that made this request.
|
||||||
|
/// </summary>
|
||||||
|
public HttpRequestModule RequestModule { get; set; }
|
||||||
|
|
||||||
private bool _finished;
|
private bool _finished;
|
||||||
public bool Finished
|
public bool Finished
|
||||||
{
|
{
|
||||||
|
@ -412,6 +456,17 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||||
public DateTime Next;
|
public DateTime Next;
|
||||||
public string proxyurl;
|
public string proxyurl;
|
||||||
public string proxyexcepts;
|
public string proxyexcepts;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Number of HTTP redirects that this request has been through.
|
||||||
|
/// </summary>
|
||||||
|
public int Redirects { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Maximum number of HTTP redirects allowed for this request.
|
||||||
|
/// </summary>
|
||||||
|
public int MaxRedirects { get; set; }
|
||||||
|
|
||||||
public string OutboundBody;
|
public string OutboundBody;
|
||||||
private UUID _reqID;
|
private UUID _reqID;
|
||||||
public UUID ReqID
|
public UUID ReqID
|
||||||
|
@ -419,7 +474,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||||
get { return _reqID; }
|
get { return _reqID; }
|
||||||
set { _reqID = value; }
|
set { _reqID = value; }
|
||||||
}
|
}
|
||||||
public WebRequest Request;
|
public HttpWebRequest Request;
|
||||||
public string ResponseBody;
|
public string ResponseBody;
|
||||||
public List<string> ResponseMetadata;
|
public List<string> ResponseMetadata;
|
||||||
public Dictionary<string, string> ResponseHeaders;
|
public Dictionary<string, string> ResponseHeaders;
|
||||||
|
@ -435,7 +490,8 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Request = WebRequest.Create(Url);
|
Request = (HttpWebRequest)WebRequest.Create(Url);
|
||||||
|
Request.AllowAutoRedirect = false;
|
||||||
Request.Method = HttpMethod;
|
Request.Method = HttpMethod;
|
||||||
Request.ContentType = HttpMIMEType;
|
Request.ContentType = HttpMIMEType;
|
||||||
|
|
||||||
|
@ -450,16 +506,19 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||||
// {
|
// {
|
||||||
// Request.ConnectionGroupName="Verify";
|
// Request.ConnectionGroupName="Verify";
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (!HttpPragmaNoCache)
|
if (!HttpPragmaNoCache)
|
||||||
{
|
{
|
||||||
Request.Headers.Add("Pragma", "no-cache");
|
Request.Headers.Add("Pragma", "no-cache");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HttpCustomHeaders != null)
|
if (HttpCustomHeaders != null)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < HttpCustomHeaders.Count; i += 2)
|
for (int i = 0; i < HttpCustomHeaders.Count; i += 2)
|
||||||
Request.Headers.Add(HttpCustomHeaders[i],
|
Request.Headers.Add(HttpCustomHeaders[i],
|
||||||
HttpCustomHeaders[i+1]);
|
HttpCustomHeaders[i+1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(proxyurl))
|
if (!string.IsNullOrEmpty(proxyurl))
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(proxyexcepts))
|
if (!string.IsNullOrEmpty(proxyexcepts))
|
||||||
|
@ -565,8 +624,53 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||||
if (response != null)
|
if (response != null)
|
||||||
response.Close();
|
response.Close();
|
||||||
|
|
||||||
|
// We need to resubmit
|
||||||
|
if (
|
||||||
|
(Status == (int)HttpStatusCode.MovedPermanently
|
||||||
|
|| Status == (int)HttpStatusCode.Found
|
||||||
|
|| Status == (int)HttpStatusCode.SeeOther
|
||||||
|
|| Status == (int)HttpStatusCode.TemporaryRedirect))
|
||||||
|
{
|
||||||
|
if (Redirects >= MaxRedirects)
|
||||||
|
{
|
||||||
|
Status = (int)OSHttpStatusCode.ClientErrorJoker;
|
||||||
|
ResponseBody = "Number of redirects exceeded max redirects";
|
||||||
_finished = true;
|
_finished = true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string location = response.Headers["Location"];
|
||||||
|
|
||||||
|
if (location == null)
|
||||||
|
{
|
||||||
|
Status = (int)OSHttpStatusCode.ClientErrorJoker;
|
||||||
|
ResponseBody = "HTTP redirect code but no location header";
|
||||||
|
_finished = true;
|
||||||
|
}
|
||||||
|
else if (!RequestModule.CheckAllowed(new Uri(location)))
|
||||||
|
{
|
||||||
|
Status = (int)OSHttpStatusCode.ClientErrorJoker;
|
||||||
|
ResponseBody = "URL from HTTP redirect blocked: " + location;
|
||||||
|
_finished = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Status = 0;
|
||||||
|
Url = response.Headers["Location"];
|
||||||
|
Redirects++;
|
||||||
|
ResponseBody = null;
|
||||||
|
|
||||||
|
// m_log.DebugFormat("Redirecting to [{0}]", Url);
|
||||||
|
|
||||||
|
Process();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_finished = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TimeoutCallback(object state, bool timedOut)
|
private void TimeoutCallback(object state, bool timedOut)
|
||||||
|
|
|
@ -146,11 +146,11 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest.Tests
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test what happens when we get a 404 response from a call.
|
/// Test what happens when we get a 404 response from a call.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Test]
|
// [Test]
|
||||||
public void Test404Response()
|
public void Test404Response()
|
||||||
{
|
{
|
||||||
TestHelpers.InMethod();
|
TestHelpers.InMethod();
|
||||||
// TestHelpers.EnableLogging();
|
TestHelpers.EnableLogging();
|
||||||
|
|
||||||
if (!Util.IsPlatformMono)
|
if (!Util.IsPlatformMono)
|
||||||
Assert.Ignore("Ignoring test since can only currently run on Mono");
|
Assert.Ignore("Ignoring test since can only currently run on Mono");
|
||||||
|
|
|
@ -32,6 +32,7 @@ using System.Net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.Imaging;
|
using OpenMetaverse.Imaging;
|
||||||
|
using OpenSim.Framework.Communications;
|
||||||
using OpenSim.Region.CoreModules.Scripting.DynamicTexture;
|
using OpenSim.Region.CoreModules.Scripting.DynamicTexture;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
@ -50,6 +51,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
private IDynamicTextureManager m_textureManager;
|
private IDynamicTextureManager m_textureManager;
|
||||||
|
|
||||||
|
private OutboundUrlFilter m_outboundUrlFilter;
|
||||||
private string m_proxyurl = "";
|
private string m_proxyurl = "";
|
||||||
private string m_proxyexcepts = "";
|
private string m_proxyexcepts = "";
|
||||||
|
|
||||||
|
@ -88,8 +90,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
||||||
|
|
||||||
public bool AsyncConvertUrl(UUID id, string url, string extraParams)
|
public bool AsyncConvertUrl(UUID id, string url, string extraParams)
|
||||||
{
|
{
|
||||||
MakeHttpRequest(url, id);
|
return MakeHttpRequest(url, id);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool AsyncConvertData(UUID id, string bodyData, string extraParams)
|
public bool AsyncConvertData(UUID id, string bodyData, string extraParams)
|
||||||
|
@ -110,6 +111,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
||||||
|
|
||||||
public void Initialise(IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
|
m_outboundUrlFilter = new OutboundUrlFilter("Script dynamic texture image module", config);
|
||||||
m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
|
m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
|
||||||
m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
|
m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
|
||||||
}
|
}
|
||||||
|
@ -157,9 +159,13 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private void MakeHttpRequest(string url, UUID requestID)
|
private bool MakeHttpRequest(string url, UUID requestID)
|
||||||
{
|
{
|
||||||
WebRequest request = HttpWebRequest.Create(url);
|
if (!m_outboundUrlFilter.CheckAllowed(new Uri(url)))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
|
||||||
|
request.AllowAutoRedirect = false;
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(m_proxyurl))
|
if (!string.IsNullOrEmpty(m_proxyurl))
|
||||||
{
|
{
|
||||||
|
@ -174,12 +180,14 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RequestState state = new RequestState((HttpWebRequest) request, requestID);
|
RequestState state = new RequestState(request, requestID);
|
||||||
// IAsyncResult result = request.BeginGetResponse(new AsyncCallback(HttpRequestReturn), state);
|
// IAsyncResult result = request.BeginGetResponse(new AsyncCallback(HttpRequestReturn), state);
|
||||||
request.BeginGetResponse(new AsyncCallback(HttpRequestReturn), state);
|
request.BeginGetResponse(new AsyncCallback(HttpRequestReturn), state);
|
||||||
|
|
||||||
TimeSpan t = (DateTime.UtcNow - new DateTime(1970, 1, 1));
|
TimeSpan t = (DateTime.UtcNow - new DateTime(1970, 1, 1));
|
||||||
state.TimeOfRequest = (int) t.TotalSeconds;
|
state.TimeOfRequest = (int) t.TotalSeconds;
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HttpRequestReturn(IAsyncResult result)
|
private void HttpRequestReturn(IAsyncResult result)
|
||||||
|
@ -195,10 +203,11 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
||||||
Stream stream = null;
|
Stream stream = null;
|
||||||
byte[] imageJ2000 = new byte[0];
|
byte[] imageJ2000 = new byte[0];
|
||||||
Size newSize = new Size(0, 0);
|
Size newSize = new Size(0, 0);
|
||||||
|
HttpWebResponse response = null;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(result);
|
response = (HttpWebResponse)request.EndGetResponse(result);
|
||||||
if (response != null && response.StatusCode == HttpStatusCode.OK)
|
if (response != null && response.StatusCode == HttpStatusCode.OK)
|
||||||
{
|
{
|
||||||
stream = response.GetResponseStream();
|
stream = response.GetResponseStream();
|
||||||
|
@ -262,11 +271,23 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (stream != null)
|
if (stream != null)
|
||||||
{
|
|
||||||
stream.Close();
|
stream.Close();
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (response != null)
|
||||||
|
response.Close();
|
||||||
|
|
||||||
|
if (
|
||||||
|
response.StatusCode == HttpStatusCode.MovedPermanently
|
||||||
|
|| response.StatusCode == HttpStatusCode.Found
|
||||||
|
|| response.StatusCode == HttpStatusCode.SeeOther
|
||||||
|
|| response.StatusCode == HttpStatusCode.TemporaryRedirect)
|
||||||
|
{
|
||||||
|
string redirectedUrl = response.Headers["Location"];
|
||||||
|
|
||||||
|
MakeHttpRequest(redirectedUrl, state.RequestID);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
m_log.DebugFormat("[LOADIMAGEURLMODULE]: Returning {0} bytes of image data for request {1}",
|
m_log.DebugFormat("[LOADIMAGEURLMODULE]: Returning {0} bytes of image data for request {1}",
|
||||||
imageJ2000.Length, state.RequestID);
|
imageJ2000.Length, state.RequestID);
|
||||||
|
|
||||||
|
@ -275,6 +296,8 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
||||||
new OpenSim.Region.CoreModules.Scripting.DynamicTexture.DynamicTexture(
|
new OpenSim.Region.CoreModules.Scripting.DynamicTexture.DynamicTexture(
|
||||||
request.RequestUri, null, imageJ2000, newSize, false));
|
request.RequestUri, null, imageJ2000, newSize, false));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#region Nested type: RequestState
|
#region Nested type: RequestState
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
|
||||||
|
@ -41,10 +42,44 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
HTTP_PRAGMA_NO_CACHE = 6
|
HTTP_PRAGMA_NO_CACHE = 6
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The initial status of the request before it is placed on the wire.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// The request may still fail later on, in which case the normal HTTP status is set.
|
||||||
|
/// </remarks>
|
||||||
|
[Flags]
|
||||||
|
public enum HttpInitialRequestStatus
|
||||||
|
{
|
||||||
|
OK = 1,
|
||||||
|
DISALLOWED_BY_FILTER = 2
|
||||||
|
}
|
||||||
|
|
||||||
public interface IHttpRequestModule
|
public interface IHttpRequestModule
|
||||||
{
|
{
|
||||||
UUID MakeHttpRequest(string url, string parameters, string body);
|
UUID MakeHttpRequest(string url, string parameters, string body);
|
||||||
UUID StartHttpRequest(uint localID, UUID itemID, string url, List<string> parameters, Dictionary<string, string> headers, string body);
|
|
||||||
|
/// <summary>
|
||||||
|
/// Starts the http request.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This is carried out asynchronously unless it fails initial checks. Results are fetched by the script engine
|
||||||
|
/// HTTP requests module to be distributed back to scripts via a script event.
|
||||||
|
/// </remarks>
|
||||||
|
/// <returns>The ID of the request. If the requested could not be performed then this is UUID.Zero</returns>
|
||||||
|
/// <param name="localID">Local ID of the object containing the script making the request.</param>
|
||||||
|
/// <param name="itemID">Item ID of the script making the request.</param>
|
||||||
|
/// <param name="url">Url to request.</param>
|
||||||
|
/// <param name="parameters">LSL parameters for the request.</param>
|
||||||
|
/// <param name="headers">Extra headers for the request.</param>
|
||||||
|
/// <param name="body">Body of the request.</param>
|
||||||
|
/// <param name="status">
|
||||||
|
/// Initial status of the request. If OK then the request is actually made to the URL. Subsequent status is
|
||||||
|
/// then returned via IServiceRequest when the response is asynchronously fetched.
|
||||||
|
/// </param>
|
||||||
|
UUID StartHttpRequest(
|
||||||
|
uint localID, UUID itemID, string url, List<string> parameters, Dictionary<string, string> headers, string body,
|
||||||
|
out HttpInitialRequestStatus status);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stop and remove all http requests for the given script.
|
/// Stop and remove all http requests for the given script.
|
||||||
|
|
|
@ -5216,6 +5216,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get terrain height at the specified <x,y> location.
|
||||||
|
// Presumes the underlying implementation is a heightmap which is a 1m grid.
|
||||||
|
// Finds heightmap grid points before and after the point and
|
||||||
|
// does a linear approximation of the height at this intermediate point.
|
||||||
public float GetGroundHeight(float x, float y)
|
public float GetGroundHeight(float x, float y)
|
||||||
{
|
{
|
||||||
if (x < 0)
|
if (x < 0)
|
||||||
|
|
|
@ -76,8 +76,8 @@ namespace OpenSim.Region.Physics.BulletSPlugin
|
||||||
private Vector3 m_linearMotorOffset = Vector3.Zero; // the point of force can be offset from the center
|
private Vector3 m_linearMotorOffset = Vector3.Zero; // the point of force can be offset from the center
|
||||||
private Vector3 m_linearMotorDirectionLASTSET = Vector3.Zero; // velocity requested by LSL
|
private Vector3 m_linearMotorDirectionLASTSET = Vector3.Zero; // velocity requested by LSL
|
||||||
private Vector3 m_linearFrictionTimescale = Vector3.Zero;
|
private Vector3 m_linearFrictionTimescale = Vector3.Zero;
|
||||||
private float m_linearMotorDecayTimescale = 0;
|
private float m_linearMotorDecayTimescale = 1;
|
||||||
private float m_linearMotorTimescale = 0;
|
private float m_linearMotorTimescale = 1;
|
||||||
private Vector3 m_lastLinearVelocityVector = Vector3.Zero;
|
private Vector3 m_lastLinearVelocityVector = Vector3.Zero;
|
||||||
private Vector3 m_lastPositionVector = Vector3.Zero;
|
private Vector3 m_lastPositionVector = Vector3.Zero;
|
||||||
// private bool m_LinearMotorSetLastFrame = false;
|
// private bool m_LinearMotorSetLastFrame = false;
|
||||||
|
@ -88,8 +88,8 @@ namespace OpenSim.Region.Physics.BulletSPlugin
|
||||||
private Vector3 m_angularMotorDirection = Vector3.Zero; // angular velocity requested by LSL motor
|
private Vector3 m_angularMotorDirection = Vector3.Zero; // angular velocity requested by LSL motor
|
||||||
// private int m_angularMotorApply = 0; // application frame counter
|
// private int m_angularMotorApply = 0; // application frame counter
|
||||||
private Vector3 m_angularMotorVelocity = Vector3.Zero; // current angular motor velocity
|
private Vector3 m_angularMotorVelocity = Vector3.Zero; // current angular motor velocity
|
||||||
private float m_angularMotorTimescale = 0; // motor angular velocity ramp up rate
|
private float m_angularMotorTimescale = 1; // motor angular velocity ramp up rate
|
||||||
private float m_angularMotorDecayTimescale = 0; // motor angular velocity decay rate
|
private float m_angularMotorDecayTimescale = 1; // motor angular velocity decay rate
|
||||||
private Vector3 m_angularFrictionTimescale = Vector3.Zero; // body angular velocity decay rate
|
private Vector3 m_angularFrictionTimescale = Vector3.Zero; // body angular velocity decay rate
|
||||||
private Vector3 m_lastAngularVelocity = Vector3.Zero;
|
private Vector3 m_lastAngularVelocity = Vector3.Zero;
|
||||||
private Vector3 m_lastVertAttractor = Vector3.Zero; // what VA was last applied to body
|
private Vector3 m_lastVertAttractor = Vector3.Zero; // what VA was last applied to body
|
||||||
|
@ -103,7 +103,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
|
||||||
|
|
||||||
//Banking properties
|
//Banking properties
|
||||||
private float m_bankingEfficiency = 0;
|
private float m_bankingEfficiency = 0;
|
||||||
private float m_bankingMix = 0;
|
private float m_bankingMix = 1;
|
||||||
private float m_bankingTimescale = 0;
|
private float m_bankingTimescale = 0;
|
||||||
|
|
||||||
//Hover and Buoyancy properties
|
//Hover and Buoyancy properties
|
||||||
|
@ -124,8 +124,10 @@ namespace OpenSim.Region.Physics.BulletSPlugin
|
||||||
private float m_verticalAttractionTimescale = 510f;
|
private float m_verticalAttractionTimescale = 510f;
|
||||||
|
|
||||||
// Just some recomputed constants:
|
// Just some recomputed constants:
|
||||||
static readonly float PIOverFour = ((float)Math.PI) / 4f;
|
|
||||||
#pragma warning disable 414
|
#pragma warning disable 414
|
||||||
|
static readonly float TwoPI = ((float)Math.PI) * 2f;
|
||||||
|
static readonly float FourPI = ((float)Math.PI) * 4f;
|
||||||
|
static readonly float PIOverFour = ((float)Math.PI) / 4f;
|
||||||
static readonly float PIOverTwo = ((float)Math.PI) / 2f;
|
static readonly float PIOverTwo = ((float)Math.PI) / 2f;
|
||||||
#pragma warning restore 414
|
#pragma warning restore 414
|
||||||
|
|
||||||
|
@ -159,56 +161,58 @@ namespace OpenSim.Region.Physics.BulletSPlugin
|
||||||
public void ProcessFloatVehicleParam(Vehicle pParam, float pValue)
|
public void ProcessFloatVehicleParam(Vehicle pParam, float pValue)
|
||||||
{
|
{
|
||||||
VDetailLog("{0},ProcessFloatVehicleParam,param={1},val={2}", ControllingPrim.LocalID, pParam, pValue);
|
VDetailLog("{0},ProcessFloatVehicleParam,param={1},val={2}", ControllingPrim.LocalID, pParam, pValue);
|
||||||
|
float clampTemp;
|
||||||
|
|
||||||
switch (pParam)
|
switch (pParam)
|
||||||
{
|
{
|
||||||
case Vehicle.ANGULAR_DEFLECTION_EFFICIENCY:
|
case Vehicle.ANGULAR_DEFLECTION_EFFICIENCY:
|
||||||
m_angularDeflectionEfficiency = ClampInRange(0f, pValue, 1f);
|
m_angularDeflectionEfficiency = ClampInRange(0f, pValue, 1f);
|
||||||
break;
|
break;
|
||||||
case Vehicle.ANGULAR_DEFLECTION_TIMESCALE:
|
case Vehicle.ANGULAR_DEFLECTION_TIMESCALE:
|
||||||
m_angularDeflectionTimescale = Math.Max(pValue, 0.01f);
|
m_angularDeflectionTimescale = ClampInRange(0.25f, pValue, 120);
|
||||||
break;
|
break;
|
||||||
case Vehicle.ANGULAR_MOTOR_DECAY_TIMESCALE:
|
case Vehicle.ANGULAR_MOTOR_DECAY_TIMESCALE:
|
||||||
m_angularMotorDecayTimescale = ClampInRange(0.01f, pValue, 120);
|
m_angularMotorDecayTimescale = ClampInRange(0.25f, pValue, 120);
|
||||||
m_angularMotor.TargetValueDecayTimeScale = m_angularMotorDecayTimescale;
|
m_angularMotor.TargetValueDecayTimeScale = m_angularMotorDecayTimescale;
|
||||||
break;
|
break;
|
||||||
case Vehicle.ANGULAR_MOTOR_TIMESCALE:
|
case Vehicle.ANGULAR_MOTOR_TIMESCALE:
|
||||||
m_angularMotorTimescale = Math.Max(pValue, 0.01f);
|
m_angularMotorTimescale = ClampInRange(0.25f, pValue, 120);
|
||||||
m_angularMotor.TimeScale = m_angularMotorTimescale;
|
m_angularMotor.TimeScale = m_angularMotorTimescale;
|
||||||
break;
|
break;
|
||||||
case Vehicle.BANKING_EFFICIENCY:
|
case Vehicle.BANKING_EFFICIENCY:
|
||||||
m_bankingEfficiency = ClampInRange(-1f, pValue, 1f);
|
m_bankingEfficiency = ClampInRange(-1f, pValue, 1f);
|
||||||
break;
|
break;
|
||||||
case Vehicle.BANKING_MIX:
|
case Vehicle.BANKING_MIX:
|
||||||
m_bankingMix = Math.Max(pValue, 0.01f);
|
m_bankingMix = ClampInRange(0.01f, pValue, 1);
|
||||||
break;
|
break;
|
||||||
case Vehicle.BANKING_TIMESCALE:
|
case Vehicle.BANKING_TIMESCALE:
|
||||||
m_bankingTimescale = Math.Max(pValue, 0.01f);
|
m_bankingTimescale = ClampInRange(0.25f, pValue, 120);
|
||||||
break;
|
break;
|
||||||
case Vehicle.BUOYANCY:
|
case Vehicle.BUOYANCY:
|
||||||
m_VehicleBuoyancy = ClampInRange(-1f, pValue, 1f);
|
m_VehicleBuoyancy = ClampInRange(-1f, pValue, 1f);
|
||||||
m_VehicleGravity = ControllingPrim.ComputeGravity(m_VehicleBuoyancy);
|
m_VehicleGravity = ControllingPrim.ComputeGravity(m_VehicleBuoyancy);
|
||||||
break;
|
break;
|
||||||
case Vehicle.HOVER_EFFICIENCY:
|
case Vehicle.HOVER_EFFICIENCY:
|
||||||
m_VhoverEfficiency = ClampInRange(0f, pValue, 1f);
|
m_VhoverEfficiency = ClampInRange(0.01f, pValue, 1f);
|
||||||
break;
|
break;
|
||||||
case Vehicle.HOVER_HEIGHT:
|
case Vehicle.HOVER_HEIGHT:
|
||||||
m_VhoverHeight = pValue;
|
m_VhoverHeight = ClampInRange(0f, pValue, 1000000f);
|
||||||
break;
|
break;
|
||||||
case Vehicle.HOVER_TIMESCALE:
|
case Vehicle.HOVER_TIMESCALE:
|
||||||
m_VhoverTimescale = Math.Max(pValue, 0.01f);
|
m_VhoverTimescale = ClampInRange(0.01f, pValue, 120);
|
||||||
break;
|
break;
|
||||||
case Vehicle.LINEAR_DEFLECTION_EFFICIENCY:
|
case Vehicle.LINEAR_DEFLECTION_EFFICIENCY:
|
||||||
m_linearDeflectionEfficiency = ClampInRange(0f, pValue, 1f);
|
m_linearDeflectionEfficiency = ClampInRange(0f, pValue, 1f);
|
||||||
break;
|
break;
|
||||||
case Vehicle.LINEAR_DEFLECTION_TIMESCALE:
|
case Vehicle.LINEAR_DEFLECTION_TIMESCALE:
|
||||||
m_linearDeflectionTimescale = Math.Max(pValue, 0.01f);
|
m_linearDeflectionTimescale = ClampInRange(0.01f, pValue, 120);
|
||||||
break;
|
break;
|
||||||
case Vehicle.LINEAR_MOTOR_DECAY_TIMESCALE:
|
case Vehicle.LINEAR_MOTOR_DECAY_TIMESCALE:
|
||||||
m_linearMotorDecayTimescale = ClampInRange(0.01f, pValue, 120);
|
m_linearMotorDecayTimescale = ClampInRange(0.01f, pValue, 120);
|
||||||
m_linearMotor.TargetValueDecayTimeScale = m_linearMotorDecayTimescale;
|
m_linearMotor.TargetValueDecayTimeScale = m_linearMotorDecayTimescale;
|
||||||
break;
|
break;
|
||||||
case Vehicle.LINEAR_MOTOR_TIMESCALE:
|
case Vehicle.LINEAR_MOTOR_TIMESCALE:
|
||||||
m_linearMotorTimescale = Math.Max(pValue, 0.01f);
|
m_linearMotorTimescale = ClampInRange(0.01f, pValue, 120);
|
||||||
m_linearMotor.TimeScale = m_linearMotorTimescale;
|
m_linearMotor.TimeScale = m_linearMotorTimescale;
|
||||||
break;
|
break;
|
||||||
case Vehicle.VERTICAL_ATTRACTION_EFFICIENCY:
|
case Vehicle.VERTICAL_ATTRACTION_EFFICIENCY:
|
||||||
|
@ -216,30 +220,35 @@ namespace OpenSim.Region.Physics.BulletSPlugin
|
||||||
m_verticalAttractionMotor.Efficiency = m_verticalAttractionEfficiency;
|
m_verticalAttractionMotor.Efficiency = m_verticalAttractionEfficiency;
|
||||||
break;
|
break;
|
||||||
case Vehicle.VERTICAL_ATTRACTION_TIMESCALE:
|
case Vehicle.VERTICAL_ATTRACTION_TIMESCALE:
|
||||||
m_verticalAttractionTimescale = Math.Max(pValue, 0.01f);
|
m_verticalAttractionTimescale = ClampInRange(0.01f, pValue, 120);
|
||||||
m_verticalAttractionMotor.TimeScale = m_verticalAttractionTimescale;
|
m_verticalAttractionMotor.TimeScale = m_verticalAttractionTimescale;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// These are vector properties but the engine lets you use a single float value to
|
// These are vector properties but the engine lets you use a single float value to
|
||||||
// set all of the components to the same value
|
// set all of the components to the same value
|
||||||
case Vehicle.ANGULAR_FRICTION_TIMESCALE:
|
case Vehicle.ANGULAR_FRICTION_TIMESCALE:
|
||||||
m_angularFrictionTimescale = new Vector3(pValue, pValue, pValue);
|
clampTemp = ClampInRange(0.01f, pValue, 120);
|
||||||
|
m_angularFrictionTimescale = new Vector3(clampTemp, clampTemp, clampTemp);
|
||||||
break;
|
break;
|
||||||
case Vehicle.ANGULAR_MOTOR_DIRECTION:
|
case Vehicle.ANGULAR_MOTOR_DIRECTION:
|
||||||
m_angularMotorDirection = new Vector3(pValue, pValue, pValue);
|
clampTemp = ClampInRange(-TwoPI, pValue, TwoPI);
|
||||||
|
m_angularMotorDirection = new Vector3(clampTemp, clampTemp, clampTemp);
|
||||||
m_angularMotor.Zero();
|
m_angularMotor.Zero();
|
||||||
m_angularMotor.SetTarget(m_angularMotorDirection);
|
m_angularMotor.SetTarget(m_angularMotorDirection);
|
||||||
break;
|
break;
|
||||||
case Vehicle.LINEAR_FRICTION_TIMESCALE:
|
case Vehicle.LINEAR_FRICTION_TIMESCALE:
|
||||||
m_linearFrictionTimescale = new Vector3(pValue, pValue, pValue);
|
clampTemp = ClampInRange(0.01f, pValue, 120);
|
||||||
|
m_linearFrictionTimescale = new Vector3(clampTemp, clampTemp, clampTemp);
|
||||||
break;
|
break;
|
||||||
case Vehicle.LINEAR_MOTOR_DIRECTION:
|
case Vehicle.LINEAR_MOTOR_DIRECTION:
|
||||||
m_linearMotorDirection = new Vector3(pValue, pValue, pValue);
|
clampTemp = ClampInRange(-BSParam.MaxLinearVelocity, pValue, BSParam.MaxLinearVelocity);
|
||||||
m_linearMotorDirectionLASTSET = new Vector3(pValue, pValue, pValue);
|
m_linearMotorDirection = new Vector3(clampTemp, clampTemp, clampTemp);
|
||||||
|
m_linearMotorDirectionLASTSET = new Vector3(clampTemp, clampTemp, clampTemp);
|
||||||
m_linearMotor.SetTarget(m_linearMotorDirection);
|
m_linearMotor.SetTarget(m_linearMotorDirection);
|
||||||
break;
|
break;
|
||||||
case Vehicle.LINEAR_MOTOR_OFFSET:
|
case Vehicle.LINEAR_MOTOR_OFFSET:
|
||||||
m_linearMotorOffset = new Vector3(pValue, pValue, pValue);
|
clampTemp = ClampInRange(-1000, pValue, 1000);
|
||||||
|
m_linearMotorOffset = new Vector3(clampTemp, clampTemp, clampTemp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -251,29 +260,46 @@ namespace OpenSim.Region.Physics.BulletSPlugin
|
||||||
switch (pParam)
|
switch (pParam)
|
||||||
{
|
{
|
||||||
case Vehicle.ANGULAR_FRICTION_TIMESCALE:
|
case Vehicle.ANGULAR_FRICTION_TIMESCALE:
|
||||||
|
pValue.X = ClampInRange(0.25f, pValue.X, 120);
|
||||||
|
pValue.Y = ClampInRange(0.25f, pValue.Y, 120);
|
||||||
|
pValue.Z = ClampInRange(0.25f, pValue.Z, 120);
|
||||||
m_angularFrictionTimescale = new Vector3(pValue.X, pValue.Y, pValue.Z);
|
m_angularFrictionTimescale = new Vector3(pValue.X, pValue.Y, pValue.Z);
|
||||||
break;
|
break;
|
||||||
case Vehicle.ANGULAR_MOTOR_DIRECTION:
|
case Vehicle.ANGULAR_MOTOR_DIRECTION:
|
||||||
// Limit requested angular speed to 2 rps= 4 pi rads/sec
|
// Limit requested angular speed to 2 rps= 4 pi rads/sec
|
||||||
pValue.X = ClampInRange(-12.56f, pValue.X, 12.56f);
|
pValue.X = ClampInRange(-FourPI, pValue.X, FourPI);
|
||||||
pValue.Y = ClampInRange(-12.56f, pValue.Y, 12.56f);
|
pValue.Y = ClampInRange(-FourPI, pValue.Y, FourPI);
|
||||||
pValue.Z = ClampInRange(-12.56f, pValue.Z, 12.56f);
|
pValue.Z = ClampInRange(-FourPI, pValue.Z, FourPI);
|
||||||
m_angularMotorDirection = new Vector3(pValue.X, pValue.Y, pValue.Z);
|
m_angularMotorDirection = new Vector3(pValue.X, pValue.Y, pValue.Z);
|
||||||
m_angularMotor.Zero();
|
m_angularMotor.Zero();
|
||||||
m_angularMotor.SetTarget(m_angularMotorDirection);
|
m_angularMotor.SetTarget(m_angularMotorDirection);
|
||||||
break;
|
break;
|
||||||
case Vehicle.LINEAR_FRICTION_TIMESCALE:
|
case Vehicle.LINEAR_FRICTION_TIMESCALE:
|
||||||
|
pValue.X = ClampInRange(0.25f, pValue.X, 120);
|
||||||
|
pValue.Y = ClampInRange(0.25f, pValue.Y, 120);
|
||||||
|
pValue.Z = ClampInRange(0.25f, pValue.Z, 120);
|
||||||
m_linearFrictionTimescale = new Vector3(pValue.X, pValue.Y, pValue.Z);
|
m_linearFrictionTimescale = new Vector3(pValue.X, pValue.Y, pValue.Z);
|
||||||
break;
|
break;
|
||||||
case Vehicle.LINEAR_MOTOR_DIRECTION:
|
case Vehicle.LINEAR_MOTOR_DIRECTION:
|
||||||
|
pValue.X = ClampInRange(-BSParam.MaxLinearVelocity, pValue.X, BSParam.MaxLinearVelocity);
|
||||||
|
pValue.Y = ClampInRange(-BSParam.MaxLinearVelocity, pValue.Y, BSParam.MaxLinearVelocity);
|
||||||
|
pValue.Z = ClampInRange(-BSParam.MaxLinearVelocity, pValue.Z, BSParam.MaxLinearVelocity);
|
||||||
m_linearMotorDirection = new Vector3(pValue.X, pValue.Y, pValue.Z);
|
m_linearMotorDirection = new Vector3(pValue.X, pValue.Y, pValue.Z);
|
||||||
m_linearMotorDirectionLASTSET = new Vector3(pValue.X, pValue.Y, pValue.Z);
|
m_linearMotorDirectionLASTSET = new Vector3(pValue.X, pValue.Y, pValue.Z);
|
||||||
m_linearMotor.SetTarget(m_linearMotorDirection);
|
m_linearMotor.SetTarget(m_linearMotorDirection);
|
||||||
break;
|
break;
|
||||||
case Vehicle.LINEAR_MOTOR_OFFSET:
|
case Vehicle.LINEAR_MOTOR_OFFSET:
|
||||||
|
// Not sure the correct range to limit this variable
|
||||||
|
pValue.X = ClampInRange(-1000, pValue.X, 1000);
|
||||||
|
pValue.Y = ClampInRange(-1000, pValue.Y, 1000);
|
||||||
|
pValue.Z = ClampInRange(-1000, pValue.Z, 1000);
|
||||||
m_linearMotorOffset = new Vector3(pValue.X, pValue.Y, pValue.Z);
|
m_linearMotorOffset = new Vector3(pValue.X, pValue.Y, pValue.Z);
|
||||||
break;
|
break;
|
||||||
case Vehicle.BLOCK_EXIT:
|
case Vehicle.BLOCK_EXIT:
|
||||||
|
// Not sure the correct range to limit this variable
|
||||||
|
pValue.X = ClampInRange(-10000, pValue.X, 10000);
|
||||||
|
pValue.Y = ClampInRange(-10000, pValue.Y, 10000);
|
||||||
|
pValue.Z = ClampInRange(-10000, pValue.Z, 10000);
|
||||||
m_BlockingEndPoint = new Vector3(pValue.X, pValue.Y, pValue.Z);
|
m_BlockingEndPoint = new Vector3(pValue.X, pValue.Y, pValue.Z);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1601,7 +1627,6 @@ namespace OpenSim.Region.Physics.BulletSPlugin
|
||||||
deflectContributionV = (-deflectionError) * ClampInRange(0, m_angularDeflectionEfficiency/m_angularDeflectionTimescale,1f);
|
deflectContributionV = (-deflectionError) * ClampInRange(0, m_angularDeflectionEfficiency/m_angularDeflectionTimescale,1f);
|
||||||
//deflectContributionV /= m_angularDeflectionTimescale;
|
//deflectContributionV /= m_angularDeflectionTimescale;
|
||||||
|
|
||||||
// VehicleRotationalVelocity += deflectContributionV * VehicleOrientation;
|
|
||||||
VehicleRotationalVelocity += deflectContributionV;
|
VehicleRotationalVelocity += deflectContributionV;
|
||||||
VDetailLog("{0}, MoveAngular,Deflection,movingDir={1},pointingDir={2},deflectError={3},ret={4}",
|
VDetailLog("{0}, MoveAngular,Deflection,movingDir={1},pointingDir={2},deflectError={3},ret={4}",
|
||||||
ControllingPrim.LocalID, movingDirection, pointingDirection, deflectionError, deflectContributionV);
|
ControllingPrim.LocalID, movingDirection, pointingDirection, deflectionError, deflectContributionV);
|
||||||
|
@ -1659,7 +1684,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
|
||||||
|
|
||||||
// TODO: the banking effect should not go to infinity but what to limit it to?
|
// TODO: the banking effect should not go to infinity but what to limit it to?
|
||||||
// And what should happen when this is being added to a user defined yaw that is already PI*4?
|
// And what should happen when this is being added to a user defined yaw that is already PI*4?
|
||||||
mixedYawAngle = ClampInRange(-12, mixedYawAngle, 12);
|
mixedYawAngle = ClampInRange(-FourPI, mixedYawAngle, FourPI);
|
||||||
|
|
||||||
// Build the force vector to change rotation from what it is to what it should be
|
// Build the force vector to change rotation from what it is to what it should be
|
||||||
bankingContributionV.Z = -mixedYawAngle;
|
bankingContributionV.Z = -mixedYawAngle;
|
||||||
|
@ -1667,7 +1692,6 @@ namespace OpenSim.Region.Physics.BulletSPlugin
|
||||||
// Don't do it all at once. Fudge because 1 second is too fast with most user defined roll as PI*4.
|
// Don't do it all at once. Fudge because 1 second is too fast with most user defined roll as PI*4.
|
||||||
bankingContributionV /= m_bankingTimescale * BSParam.VehicleAngularBankingTimescaleFudge;
|
bankingContributionV /= m_bankingTimescale * BSParam.VehicleAngularBankingTimescaleFudge;
|
||||||
|
|
||||||
//VehicleRotationalVelocity += bankingContributionV * VehicleOrientation;
|
|
||||||
VehicleRotationalVelocity += bankingContributionV;
|
VehicleRotationalVelocity += bankingContributionV;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11004,8 +11004,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HttpInitialRequestStatus status;
|
||||||
UUID reqID
|
UUID reqID
|
||||||
= httpScriptMod.StartHttpRequest(m_host.LocalId, m_item.ItemID, url, param, httpHeaders, body);
|
= httpScriptMod.StartHttpRequest(m_host.LocalId, m_item.ItemID, url, param, httpHeaders, body, out status);
|
||||||
|
|
||||||
|
if (status == HttpInitialRequestStatus.DISALLOWED_BY_FILTER)
|
||||||
|
Error("llHttpRequest", string.Format("Request to {0} disallowed by filter", url));
|
||||||
|
|
||||||
if (reqID != UUID.Zero)
|
if (reqID != UUID.Zero)
|
||||||
return reqID.ToString();
|
return reqID.ToString();
|
||||||
|
|
|
@ -46,11 +46,11 @@ namespace OpenSim.Server.Base
|
||||||
/// </value>
|
/// </value>
|
||||||
|
|
||||||
// The range of acceptable servers for client-side connectors
|
// The range of acceptable servers for client-side connectors
|
||||||
public readonly static int ClientProtocolVersionMin = 0;
|
public readonly static int ClientProtocolVersionMin = 1;
|
||||||
public readonly static int ClientProtocolVersionMax = 0;
|
public readonly static int ClientProtocolVersionMax = 1;
|
||||||
|
|
||||||
// The range of acceptable clients in server-side handlers
|
// The range of acceptable clients in server-side handlers
|
||||||
public readonly static int ServerProtocolVersionMin = 0;
|
public readonly static int ServerProtocolVersionMin = 1;
|
||||||
public readonly static int ServerProtocolVersionMax = 0;
|
public readonly static int ServerProtocolVersionMax = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@ namespace OpenSim.Server.Handlers
|
||||||
|
|
||||||
public class EstateServerGetHandler : BaseStreamHandler
|
public class EstateServerGetHandler : BaseStreamHandler
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
IEstateDataService m_EstateService;
|
IEstateDataService m_EstateService;
|
||||||
|
|
||||||
|
@ -94,7 +94,6 @@ namespace OpenSim.Server.Handlers
|
||||||
protected override byte[] ProcessRequest(string path, Stream request,
|
protected override byte[] ProcessRequest(string path, Stream request,
|
||||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
byte[] result = new byte[0];
|
|
||||||
Dictionary<string, object> data = null;
|
Dictionary<string, object> data = null;
|
||||||
|
|
||||||
string[] p = SplitParams(path);
|
string[] p = SplitParams(path);
|
||||||
|
@ -271,7 +270,6 @@ namespace OpenSim.Server.Handlers
|
||||||
protected override byte[] ProcessRequest(string path, Stream request,
|
protected override byte[] ProcessRequest(string path, Stream request,
|
||||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
byte[] result = new byte[0];
|
|
||||||
Dictionary<string, object> data = null;
|
Dictionary<string, object> data = null;
|
||||||
|
|
||||||
string[] p = SplitParams(path);
|
string[] p = SplitParams(path);
|
||||||
|
|
|
@ -162,6 +162,7 @@ namespace OpenSim.Server.Handlers.Simulation
|
||||||
resp["success"] = OSD.FromBoolean(result);
|
resp["success"] = OSD.FromBoolean(result);
|
||||||
resp["reason"] = OSD.FromString(reason);
|
resp["reason"] = OSD.FromString(reason);
|
||||||
resp["version"] = OSD.FromString(version);
|
resp["version"] = OSD.FromString(version);
|
||||||
|
resp["variable_wearables_count_supported"] = OSD.FromBoolean(true);
|
||||||
|
|
||||||
// We must preserve defaults here, otherwise a false "success" will not be put into the JSON map!
|
// We must preserve defaults here, otherwise a false "success" will not be put into the JSON map!
|
||||||
responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true);
|
responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true);
|
||||||
|
|
|
@ -301,6 +301,7 @@ namespace OpenSim.Services.Connectors
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[PRESENCE CONNECTOR]: Exception when contacting presence server at {0}: {1}", uri, e.Message);
|
m_log.DebugFormat("[PRESENCE CONNECTOR]: Exception when contacting presence server at {0}: {1}", uri, e.Message);
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
||||||
|
|
Binary file not shown.
|
@ -486,6 +486,32 @@
|
||||||
;; the region ports use UDP.
|
;; the region ports use UDP.
|
||||||
; http_listener_port = 9000
|
; http_listener_port = 9000
|
||||||
|
|
||||||
|
; By default, OpenSimulator does not allow scripts to make HTTP calls to addresses on the simulator's LAN.
|
||||||
|
; See the OutboundDisallowForUserScripts parameter in OpenSimDefaults.ini for more information on this filter.
|
||||||
|
; If you need to allow scripts to make some LAN calls use the OutboundDisallowForUserScriptsExcept parameter below.
|
||||||
|
; We recommend that you do not override OutboundDisallowForUserScripts directly unless you are very sure about what you're doing.
|
||||||
|
;
|
||||||
|
; You can whitelist individual endpoints by IP or FQDN, e.g.
|
||||||
|
;
|
||||||
|
; OutboundDisallowForUserScriptsExcept = 192.168.1.3:8003
|
||||||
|
;
|
||||||
|
; You can specify multiple addresses by separating them with a bar. For example,
|
||||||
|
;
|
||||||
|
; OutboundDisallowForUserScriptsExcept = 192.168.1.3:8003|myinternalserver:8000
|
||||||
|
;
|
||||||
|
; If an address if given without a port number then port 80 is assumed
|
||||||
|
;
|
||||||
|
; You can also specify a network range in CIDR notation to whitelist, e.g.
|
||||||
|
;
|
||||||
|
; OutboundDisallowForUserScriptsExcept = 192.168.1.0/24
|
||||||
|
;
|
||||||
|
; to whitelist all ports on addresses 192.168.1.0 to 192.168.1.255
|
||||||
|
; To specify an individual IP address use the /32 netmask
|
||||||
|
;
|
||||||
|
; OutboundDisallowForUserScriptsExcept = 192.168.1.2/32
|
||||||
|
;
|
||||||
|
; See http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation for more information on CIDR notation
|
||||||
|
|
||||||
;# {ExternalHostNameForLSL} {} {Hostname to use for HTTP-IN URLs. This should be reachable from the internet.} {}
|
;# {ExternalHostNameForLSL} {} {Hostname to use for HTTP-IN URLs. This should be reachable from the internet.} {}
|
||||||
;; Hostname to use in llRequestURL/llRequestSecureURL
|
;; Hostname to use in llRequestURL/llRequestSecureURL
|
||||||
;; if not defined - default machine name is being used
|
;; if not defined - default machine name is being used
|
||||||
|
@ -568,7 +594,6 @@
|
||||||
Cap_GetTexture = "localhost"
|
Cap_GetTexture = "localhost"
|
||||||
Cap_GetMesh = "localhost"
|
Cap_GetMesh = "localhost"
|
||||||
Cap_AvatarPickerSearch = "localhost"
|
Cap_AvatarPickerSearch = "localhost"
|
||||||
Cap_GetDisplayNames = "localhost"
|
|
||||||
|
|
||||||
|
|
||||||
[SimulatorFeatures]
|
[SimulatorFeatures]
|
||||||
|
|
|
@ -492,6 +492,26 @@
|
||||||
; (on Windows this mean NETBIOS name - useably only inside local network)
|
; (on Windows this mean NETBIOS name - useably only inside local network)
|
||||||
; ExternalHostNameForLSL=127.0.0.1
|
; ExternalHostNameForLSL=127.0.0.1
|
||||||
|
|
||||||
|
; Disallow the following address ranges for user scripting calls (e.g. llHttpRequest())
|
||||||
|
; This is based on http://en.wikipedia.org/wiki/Reserved_IP_addresses
|
||||||
|
; This stops users making HTTP calls to machines in the simulator's local network.
|
||||||
|
; If you need to allow some LAN calls we recommend you use OutboundDisallowForUserScriptsExcept documented in OpenSim.ini.example
|
||||||
|
; If you override OutboundDisallowForUserScripts directly you need to be very careful.
|
||||||
|
;
|
||||||
|
; Network ranges are specified in CIDR notation (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation) with multiple entries separated by |
|
||||||
|
; To specify an individual IP address use the /32 netmask (e.g. 192.168.1.3/32)
|
||||||
|
; You can also specify individual <addr>:<port> endpoints (e.g. 192.168.1.3:8003)
|
||||||
|
; If an address if given without a port number then port 80 is assumed.
|
||||||
|
OutboundDisallowForUserScripts = 0.0.0.0/8|10.0.0.0/8|100.64.0.0/10|127.0.0.0/8|169.254.0.0/16|172.16.0.0/12|192.0.0.0/24|192.0.2.0/24|192.88.99.0/24|192.168.0.0/16|198.18.0.0/15|198.51.100.0/24|203.0.113.0/24|224.0.0.0/4|240.0.0.0/4|255.255.255.255/32
|
||||||
|
;
|
||||||
|
; You can also prevent all user script outgoing calls with the following override in OpenSim.ini
|
||||||
|
;
|
||||||
|
; OutboundDisallowForUserScripts = 0.0.0.0/0
|
||||||
|
;
|
||||||
|
; You can also disable the blacklist entirely with an empty entry
|
||||||
|
;
|
||||||
|
; OutboundDisallowForUserScripts = ""
|
||||||
|
|
||||||
; What is reported as the "X-Secondlife-Shard"
|
; What is reported as the "X-Secondlife-Shard"
|
||||||
; Defaults to the user server url if not set
|
; Defaults to the user server url if not set
|
||||||
; The old default is "OpenSim", set here for compatibility
|
; The old default is "OpenSim", set here for compatibility
|
||||||
|
@ -645,7 +665,7 @@
|
||||||
Cap_ObjectMediaNavigate = "localhost"
|
Cap_ObjectMediaNavigate = "localhost"
|
||||||
Cap_FetchLib = ""
|
Cap_FetchLib = ""
|
||||||
Cap_FetchLibDescendents = ""
|
Cap_FetchLibDescendents = ""
|
||||||
Cap_GetDisplayNames = "localhost"
|
Cap_GetDisplayNames = ""
|
||||||
Cap_GetTexture = "localhost"
|
Cap_GetTexture = "localhost"
|
||||||
Cap_GetMesh = "localhost"
|
Cap_GetMesh = "localhost"
|
||||||
Cap_GetObjectCost = ""
|
Cap_GetObjectCost = ""
|
||||||
|
|
|
@ -15,13 +15,13 @@
|
||||||
; * You MUST change this! It will NOT be done for you!
|
; * You MUST change this! It will NOT be done for you!
|
||||||
; *
|
; *
|
||||||
|
|
||||||
RegionUUID = "11111111-2222-3333-4444-555555555555"
|
RegionUUID = 11111111-2222-3333-4444-555555555555
|
||||||
|
|
||||||
Location = "1000,1000"
|
Location = 1000,1000
|
||||||
InternalAddress = "127.0.0.1"
|
InternalAddress = 0.0.0.0
|
||||||
InternalPort = 9000
|
InternalPort = 9000
|
||||||
AllowAlternatePorts = False
|
AllowAlternatePorts = False
|
||||||
ExternalHostName = "SYSTEMIP"
|
ExternalHostName = SYSTEMIP
|
||||||
|
|
||||||
; *
|
; *
|
||||||
; * Variable-sized regions allows the creation of large, borderless spaces.
|
; * Variable-sized regions allows the creation of large, borderless spaces.
|
||||||
|
@ -67,13 +67,13 @@ ExternalHostName = "SYSTEMIP"
|
||||||
; *
|
; *
|
||||||
; * Now, there is a setting in [Map] in OpenSim.ini called
|
; * Now, there is a setting in [Map] in OpenSim.ini called
|
||||||
; *
|
; *
|
||||||
; * MaptileStaticUUID = "00000000-0000-0000-0000-000000000000"
|
; * MaptileStaticUUID = 00000000-0000-0000-0000-000000000000
|
||||||
; *
|
; *
|
||||||
; * where, given the criteria above, lets you specify the UUID of a texture asset to use
|
; * where, given the criteria above, lets you specify the UUID of a texture asset to use
|
||||||
; * as a maptile *Simulator Wide*. Here, you can override that on a per region basis for
|
; * as a maptile *Simulator Wide*. Here, you can override that on a per region basis for
|
||||||
; * Simulators that run multiple regions:
|
; * Simulators that run multiple regions:
|
||||||
|
|
||||||
; MaptileStaticUUID = "00000000-0000-0000-0000-000000000000"
|
; MaptileStaticUUID = 00000000-0000-0000-0000-000000000000
|
||||||
|
|
||||||
|
|
||||||
; * Region Specific Static Maptiles from file:
|
; * Region Specific Static Maptiles from file:
|
||||||
|
|
|
@ -153,6 +153,13 @@
|
||||||
;; Hypergrid services are not affected by this; they are publicly available
|
;; Hypergrid services are not affected by this; they are publicly available
|
||||||
;; by design.
|
;; by design.
|
||||||
|
|
||||||
|
;; By default, scripts are not allowed to call private services via llHttpRequest()
|
||||||
|
;; Such calls are detected by the X-SecondLife-Shared HTTP header
|
||||||
|
;; If you allow such calls you must be sure that they are restricted to very trusted scripters
|
||||||
|
;; (remember scripts can also be in visiting avatar attachments).
|
||||||
|
;; This can be overriden in individual private service sections if necessary
|
||||||
|
AllowllHTTPRequestIn = false
|
||||||
|
|
||||||
; * The following are for the remote console
|
; * The following are for the remote console
|
||||||
; * They have no effect for the local or basic console types
|
; * They have no effect for the local or basic console types
|
||||||
; * Leave commented to diable logins to the console
|
; * Leave commented to diable logins to the console
|
||||||
|
@ -649,6 +656,12 @@
|
||||||
UserAccountsService = "OpenSim.Services.UserAccountService.dll:UserAccountService"
|
UserAccountsService = "OpenSim.Services.UserAccountService.dll:UserAccountService"
|
||||||
AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService"
|
AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService"
|
||||||
|
|
||||||
|
; HGInventoryService is a public-facing inventory service that allows users to
|
||||||
|
; interact with their suitcase folder when on a foreign grid. This reuses the general inventory service connector.
|
||||||
|
; Hence, if the user has set up authentication in [Network] to protect their private services
|
||||||
|
; make sure it is not set here.
|
||||||
|
AuthType = None
|
||||||
|
|
||||||
;; Can overwrite the default in [Hypergrid], but probably shouldn't
|
;; Can overwrite the default in [Hypergrid], but probably shouldn't
|
||||||
; HomeURI = "${Const|BaseURL}:${Const|PublicPort}"
|
; HomeURI = "${Const|BaseURL}:${Const|PublicPort}"
|
||||||
|
|
||||||
|
@ -661,6 +674,12 @@
|
||||||
LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGAssetService"
|
LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGAssetService"
|
||||||
UserAccountsService = "OpenSim.Services.UserAccountService.dll:UserAccountService"
|
UserAccountsService = "OpenSim.Services.UserAccountService.dll:UserAccountService"
|
||||||
|
|
||||||
|
; HGAssetService is a public-facing service that allows users to
|
||||||
|
; read and create assets when on another grid. This reuses the general asset service connector.
|
||||||
|
; Hence, if the user has set up authentication in [Network] to protect their private services
|
||||||
|
; make sure it is overriden for this public service.
|
||||||
|
AuthType = None
|
||||||
|
|
||||||
;; Can overwrite the default in [Hypergrid], but probably shouldn't
|
;; Can overwrite the default in [Hypergrid], but probably shouldn't
|
||||||
; HomeURI = "${Const|BaseURL}:${Const|PublicPort}"
|
; HomeURI = "${Const|BaseURL}:${Const|PublicPort}"
|
||||||
|
|
||||||
|
|
|
@ -130,6 +130,13 @@
|
||||||
;; but unprotect individual services. Username and Password can also be
|
;; but unprotect individual services. Username and Password can also be
|
||||||
;; overriden if you want to use different credentials for the different services.
|
;; overriden if you want to use different credentials for the different services.
|
||||||
|
|
||||||
|
;; By default, scripts are not allowed to call private services via llHttpRequest()
|
||||||
|
;; Such calls are detected by the X-SecondLife-Shared HTTP header
|
||||||
|
;; If you allow such calls you must be sure that they are restricted to very trusted scripters
|
||||||
|
;; (remember scripts can also be in visiting avatar attachments).
|
||||||
|
;; This can be overriden in individual private service sections if necessary
|
||||||
|
AllowllHTTPRequestIn = false
|
||||||
|
|
||||||
; * The following are for the remote console
|
; * The following are for the remote console
|
||||||
; * They have no effect for the local or basic console types
|
; * They have no effect for the local or basic console types
|
||||||
; * Leave commented to diable logins to the console
|
; * Leave commented to diable logins to the console
|
||||||
|
|
|
@ -1,3 +1,14 @@
|
||||||
|
<!--
|
||||||
|
In Keys,
|
||||||
|
name is the name of the item.
|
||||||
|
description is the description of the item.
|
||||||
|
assetID is the ID of the asset data that is referenced by the item.
|
||||||
|
folderID is the ID of the folder containing this item.
|
||||||
|
inventoryID is the ID for the item. It must be unique.
|
||||||
|
assetType is the asset type of the item. See the OpenMetaverse.AssetType enum in libopenmetaverse
|
||||||
|
inventoryType is the inventory type of the item. See the OpenMetaverse.InventoryType enum in libopenmetaverse
|
||||||
|
-->
|
||||||
|
|
||||||
<Nini>
|
<Nini>
|
||||||
<Section Name="place_marker">
|
<Section Name="place_marker">
|
||||||
<Key Name="folderID" Value="f0908f10-b9bf-11dc-95ff-0800200c9a66"/>
|
<Key Name="folderID" Value="f0908f10-b9bf-11dc-95ff-0800200c9a66"/>
|
||||||
|
|
|
@ -1,5 +1,17 @@
|
||||||
<Nini>
|
<Nini>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
In Keys,
|
||||||
|
name is the name of the item.
|
||||||
|
description is the description of the item.
|
||||||
|
assetID is the ID of the asset data that is referenced by the item.
|
||||||
|
folderID is the ID of the folder containing this item.
|
||||||
|
inventoryID is the ID for the item. It must be unique.
|
||||||
|
assetType is the asset type of the item. See the OpenMetaverse.AssetType enum in libopenmetaverse
|
||||||
|
inventoryType is the inventory type of the item. See the OpenMetaverse.InventoryType enum in libopenmetaverse
|
||||||
|
flags are only required for wearables. See OpenMetaverse.WearableType enum in libopenmetaverse.
|
||||||
|
-->
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<Section Name="Example Library Item">
|
<Section Name="Example Library Item">
|
||||||
<Key Name="inventoryID" Value="30000000-0000-2222-4444-000000000001" />
|
<Key Name="inventoryID" Value="30000000-0000-2222-4444-000000000001" />
|
||||||
|
@ -9,6 +21,7 @@
|
||||||
<Key Name="name" Value="Example Library Item" />
|
<Key Name="name" Value="Example Library Item" />
|
||||||
<Key Name="assetType" Value="7" />
|
<Key Name="assetType" Value="7" />
|
||||||
<Key Name="inventoryType" Value="7" />
|
<Key Name="inventoryType" Value="7" />
|
||||||
|
<Key Name="flags" Value="0" />
|
||||||
</Section>
|
</Section>
|
||||||
-->
|
-->
|
||||||
<!--
|
<!--
|
||||||
|
@ -20,6 +33,7 @@
|
||||||
<Key Name="name" Value="Hair" />
|
<Key Name="name" Value="Hair" />
|
||||||
<Key Name="assetType" Value="13" />
|
<Key Name="assetType" Value="13" />
|
||||||
<Key Name="inventoryType" Value="18" />
|
<Key Name="inventoryType" Value="18" />
|
||||||
|
<Key Name="flags" Value="2" />
|
||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
<Section Name="Skin">
|
<Section Name="Skin">
|
||||||
|
@ -30,6 +44,7 @@
|
||||||
<Key Name="name" Value="Skin" />
|
<Key Name="name" Value="Skin" />
|
||||||
<Key Name="assetType" Value="13" />
|
<Key Name="assetType" Value="13" />
|
||||||
<Key Name="inventoryType" Value="18" />
|
<Key Name="inventoryType" Value="18" />
|
||||||
|
<Key Name="flags" Value="1" />
|
||||||
</Section>
|
</Section>
|
||||||
-->
|
-->
|
||||||
<!--
|
<!--
|
||||||
|
@ -41,6 +56,7 @@
|
||||||
<Key Name="name" Value="Jim Skin" />
|
<Key Name="name" Value="Jim Skin" />
|
||||||
<Key Name="assetType" Value="13" />
|
<Key Name="assetType" Value="13" />
|
||||||
<Key Name="inventoryType" Value="13" />
|
<Key Name="inventoryType" Value="13" />
|
||||||
|
<Key Name="flags" Value="1" />
|
||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
<Section Name="Little Goblin Skin">
|
<Section Name="Little Goblin Skin">
|
||||||
|
@ -51,6 +67,7 @@
|
||||||
<Key Name="name" Value="Little Goblin Skin" />
|
<Key Name="name" Value="Little Goblin Skin" />
|
||||||
<Key Name="assetType" Value="13" />
|
<Key Name="assetType" Value="13" />
|
||||||
<Key Name="inventoryType" Value="13" />
|
<Key Name="inventoryType" Value="13" />
|
||||||
|
<Key Name="flags" Value="1" />
|
||||||
</Section>
|
</Section>
|
||||||
-->
|
-->
|
||||||
<!--
|
<!--
|
||||||
|
@ -62,6 +79,7 @@
|
||||||
<Key Name="name" Value="Shape" />
|
<Key Name="name" Value="Shape" />
|
||||||
<Key Name="assetType" Value="13" />
|
<Key Name="assetType" Value="13" />
|
||||||
<Key Name="inventoryType" Value="18" />
|
<Key Name="inventoryType" Value="18" />
|
||||||
|
<Key Name="flags" Value="0" />
|
||||||
</Section>
|
</Section>
|
||||||
-->
|
-->
|
||||||
<!--
|
<!--
|
||||||
|
@ -73,6 +91,7 @@
|
||||||
<Key Name="name" Value="Jim Shape" />
|
<Key Name="name" Value="Jim Shape" />
|
||||||
<Key Name="assetType" Value="13" />
|
<Key Name="assetType" Value="13" />
|
||||||
<Key Name="inventoryType" Value="13" />
|
<Key Name="inventoryType" Value="13" />
|
||||||
|
<Key Name="flags" Value="0" />
|
||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
<Section Name="Little Goblin Shape">
|
<Section Name="Little Goblin Shape">
|
||||||
|
@ -83,6 +102,7 @@
|
||||||
<Key Name="name" Value="Little Goblin Shape" />
|
<Key Name="name" Value="Little Goblin Shape" />
|
||||||
<Key Name="assetType" Value="13" />
|
<Key Name="assetType" Value="13" />
|
||||||
<Key Name="inventoryType" Value="13" />
|
<Key Name="inventoryType" Value="13" />
|
||||||
|
<Key Name="flags" Value="0" />
|
||||||
</Section>
|
</Section>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,17 @@
|
||||||
<Nini>
|
<Nini>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
In Keys,
|
||||||
|
name is the name of the item.
|
||||||
|
description is the description of the item.
|
||||||
|
assetID is the ID of the asset data that is referenced by the item.
|
||||||
|
folderID is the ID of the folder containing this item.
|
||||||
|
inventoryID is the ID for the item. It must be unique.
|
||||||
|
assetType is the asset type of the item. See the OpenMetaverse.AssetType enum in libopenmetaverse
|
||||||
|
inventoryType is the inventory type of the item. See the OpenMetaverse.InventoryType enum in libopenmetaverse
|
||||||
|
flags are only required for wearables. See OpenMetaverse.WearableType enum in libopenmetaverse.
|
||||||
|
-->
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<Section Name="Example Library Item">
|
<Section Name="Example Library Item">
|
||||||
<Key Name="inventoryID" Value="30000000-0000-2222-4444-000000000001" />
|
<Key Name="inventoryID" Value="30000000-0000-2222-4444-000000000001" />
|
||||||
|
@ -9,6 +21,7 @@
|
||||||
<Key Name="name" Value="Example Library Item" />
|
<Key Name="name" Value="Example Library Item" />
|
||||||
<Key Name="assetType" Value="7" />
|
<Key Name="assetType" Value="7" />
|
||||||
<Key Name="inventoryType" Value="7" />
|
<Key Name="inventoryType" Value="7" />
|
||||||
|
<Key Name="flags" Value="0" />
|
||||||
</Section>
|
</Section>
|
||||||
-->
|
-->
|
||||||
<!--
|
<!--
|
||||||
|
@ -20,6 +33,7 @@
|
||||||
<Key Name="name" Value="Shirt" />
|
<Key Name="name" Value="Shirt" />
|
||||||
<Key Name="assetType" Value="5" />
|
<Key Name="assetType" Value="5" />
|
||||||
<Key Name="inventoryType" Value="18" />
|
<Key Name="inventoryType" Value="18" />
|
||||||
|
<Key Name="flags" Value="4" />
|
||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
<Section Name="Pants">
|
<Section Name="Pants">
|
||||||
|
@ -30,6 +44,7 @@
|
||||||
<Key Name="name" Value="Pants" />
|
<Key Name="name" Value="Pants" />
|
||||||
<Key Name="assetType" Value="5" />
|
<Key Name="assetType" Value="5" />
|
||||||
<Key Name="inventoryType" Value="18" />
|
<Key Name="inventoryType" Value="18" />
|
||||||
|
<Key Name="flags" Value="5" />
|
||||||
</Section>
|
</Section>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,15 @@
|
||||||
|
<!--
|
||||||
|
In Keys,
|
||||||
|
name is the name of the item.
|
||||||
|
description is the description of the item.
|
||||||
|
assetID is the ID of the asset data that is referenced by the item.
|
||||||
|
folderID is the ID of the folder containing this item.
|
||||||
|
inventoryID is the ID for the item. It must be unique.
|
||||||
|
assetType is the asset type of the item. See the OpenMetaverse.AssetType enum in libopenmetaverse
|
||||||
|
inventoryType is the inventory type of the item. See the OpenMetaverse.InventoryType enum in libopenmetaverse
|
||||||
|
flags are only required for wearables. See OpenMetaverse.WearableType enum in libopenmetaverse.
|
||||||
|
-->
|
||||||
|
|
||||||
<Nini>
|
<Nini>
|
||||||
<Section Name="can we move along?">
|
<Section Name="can we move along?">
|
||||||
<Key Name="inventoryID" Value="9ffe3767-74fa-4c64-a046-18ccf50b9eac"/>
|
<Key Name="inventoryID" Value="9ffe3767-74fa-4c64-a046-18ccf50b9eac"/>
|
||||||
|
|
|
@ -1,3 +1,15 @@
|
||||||
|
<!--
|
||||||
|
In Keys,
|
||||||
|
name is the name of the item.
|
||||||
|
description is the description of the item.
|
||||||
|
assetID is the ID of the asset data that is referenced by the item.
|
||||||
|
folderID is the ID of the folder containing this item.
|
||||||
|
inventoryID is the ID for the item. It must be unique.
|
||||||
|
assetType is the asset type of the item. See the OpenMetaverse.AssetType enum in libopenmetaverse
|
||||||
|
inventoryType is the inventory type of the item. See the OpenMetaverse.InventoryType enum in libopenmetaverse
|
||||||
|
flags are only required for wearables. See OpenMetaverse.WearableType enum in libopenmetaverse.
|
||||||
|
-->
|
||||||
|
|
||||||
<Nini>
|
<Nini>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
|
@ -1,3 +1,15 @@
|
||||||
|
<!--
|
||||||
|
In Keys,
|
||||||
|
name is the name of the item.
|
||||||
|
description is the description of the item.
|
||||||
|
assetID is the ID of the asset data that is referenced by the item.
|
||||||
|
folderID is the ID of the folder containing this item.
|
||||||
|
inventoryID is the ID for the item. It must be unique.
|
||||||
|
assetType is the asset type of the item. See the OpenMetaverse.AssetType enum in libopenmetaverse
|
||||||
|
inventoryType is the inventory type of the item. See the OpenMetaverse.InventoryType enum in libopenmetaverse
|
||||||
|
flags are only required for wearables. See OpenMetaverse.WearableType enum in libopenmetaverse.
|
||||||
|
-->
|
||||||
|
|
||||||
<Nini>
|
<Nini>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
|
@ -1,3 +1,15 @@
|
||||||
|
<!--
|
||||||
|
In Keys,
|
||||||
|
name is the name of the item.
|
||||||
|
description is the description of the item.
|
||||||
|
assetID is the ID of the asset data that is referenced by the item.
|
||||||
|
folderID is the ID of the folder containing this item.
|
||||||
|
inventoryID is the ID for the item. It must be unique.
|
||||||
|
assetType is the asset type of the item. See the OpenMetaverse.AssetType enum in libopenmetaverse
|
||||||
|
inventoryType is the inventory type of the item. See the OpenMetaverse.InventoryType enum in libopenmetaverse
|
||||||
|
flags are only required for wearables. See OpenMetaverse.WearableType enum in libopenmetaverse.
|
||||||
|
-->
|
||||||
|
|
||||||
<Nini>
|
<Nini>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
|
@ -1,3 +1,15 @@
|
||||||
|
<!--
|
||||||
|
In Keys,
|
||||||
|
name is the name of the item.
|
||||||
|
description is the description of the item.
|
||||||
|
assetID is the ID of the asset data that is referenced by the item.
|
||||||
|
folderID is the ID of the folder containing this item.
|
||||||
|
inventoryID is the ID for the item. It must be unique.
|
||||||
|
assetType is the asset type of the item. See the OpenMetaverse.AssetType enum in libopenmetaverse
|
||||||
|
inventoryType is the inventory type of the item. See the OpenMetaverse.InventoryType enum in libopenmetaverse
|
||||||
|
flags are only required for wearables. See OpenMetaverse.WearableType enum in libopenmetaverse.
|
||||||
|
-->
|
||||||
|
|
||||||
<Nini>
|
<Nini>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
|
@ -1,3 +1,15 @@
|
||||||
|
<!--
|
||||||
|
In Keys,
|
||||||
|
name is the name of the item.
|
||||||
|
description is the description of the item.
|
||||||
|
assetID is the ID of the asset data that is referenced by the item.
|
||||||
|
folderID is the ID of the folder containing this item.
|
||||||
|
inventoryID is the ID for the item. It must be unique.
|
||||||
|
assetType is the asset type of the item. See the OpenMetaverse.AssetType enum in libopenmetaverse
|
||||||
|
inventoryType is the inventory type of the item. See the OpenMetaverse.InventoryType enum in libopenmetaverse
|
||||||
|
flags are only required for wearables. See OpenMetaverse.WearableType enum in libopenmetaverse.
|
||||||
|
-->
|
||||||
|
|
||||||
<Nini>
|
<Nini>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
|
@ -1,3 +1,15 @@
|
||||||
|
<!--
|
||||||
|
In Keys,
|
||||||
|
name is the name of the item.
|
||||||
|
description is the description of the item.
|
||||||
|
assetID is the ID of the asset data that is referenced by the item.
|
||||||
|
folderID is the ID of the folder containing this item.
|
||||||
|
inventoryID is the ID for the item. It must be unique.
|
||||||
|
assetType is the asset type of the item. See the OpenMetaverse.AssetType enum in libopenmetaverse
|
||||||
|
inventoryType is the inventory type of the item. See the OpenMetaverse.InventoryType enum in libopenmetaverse
|
||||||
|
flags are only required for wearables. See OpenMetaverse.WearableType enum in libopenmetaverse.
|
||||||
|
-->
|
||||||
|
|
||||||
<Nini>
|
<Nini>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
|
@ -1,3 +1,15 @@
|
||||||
|
<!--
|
||||||
|
In Keys,
|
||||||
|
name is the name of the item.
|
||||||
|
description is the description of the item.
|
||||||
|
assetID is the ID of the asset data that is referenced by the item.
|
||||||
|
folderID is the ID of the folder containing this item.
|
||||||
|
inventoryID is the ID for the item. It must be unique.
|
||||||
|
assetType is the asset type of the item. See the OpenMetaverse.AssetType enum in libopenmetaverse
|
||||||
|
inventoryType is the inventory type of the item. See the OpenMetaverse.InventoryType enum in libopenmetaverse
|
||||||
|
flags are only required for wearables. See OpenMetaverse.WearableType enum in libopenmetaverse.
|
||||||
|
-->
|
||||||
|
|
||||||
<Nini>
|
<Nini>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
|
@ -593,6 +593,7 @@
|
||||||
|
|
||||||
<ReferencePath>../../../bin/</ReferencePath>
|
<ReferencePath>../../../bin/</ReferencePath>
|
||||||
<Reference name="System"/>
|
<Reference name="System"/>
|
||||||
|
<Reference name="System.Core"/>
|
||||||
<Reference name="System.Xml"/>
|
<Reference name="System.Xml"/>
|
||||||
<Reference name="System.Web"/>
|
<Reference name="System.Web"/>
|
||||||
<Reference name="OpenSim.Data"/>
|
<Reference name="OpenSim.Data"/>
|
||||||
|
@ -607,6 +608,7 @@
|
||||||
<Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/>
|
<Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/>
|
||||||
<!-- FIXME: The OpenMetaverse.dll reference can be dropped when the TransferRequestPacket reference is removed from the code -->
|
<!-- FIXME: The OpenMetaverse.dll reference can be dropped when the TransferRequestPacket reference is removed from the code -->
|
||||||
<Reference name="OpenMetaverse" path="../../../bin/"/>
|
<Reference name="OpenMetaverse" path="../../../bin/"/>
|
||||||
|
<Reference name="LukeSkywalker.IPNetwork" path="../../../bin/"/>
|
||||||
<Reference name="Nini" path="../../../bin/"/>
|
<Reference name="Nini" path="../../../bin/"/>
|
||||||
<Reference name="XMLRPC" path="../../../bin/"/>
|
<Reference name="XMLRPC" path="../../../bin/"/>
|
||||||
<Reference name="log4net" path="../../../bin/"/>
|
<Reference name="log4net" path="../../../bin/"/>
|
||||||
|
|
Loading…
Reference in New Issue