aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2009-08-17 13:27:22 -0700
committerDiva Canto2009-08-17 13:27:22 -0700
commit59b4cf2d5bc3077ba9c53b7ccea567537a16aa4e (patch)
treec2e3b45589a756c58c88e85b274719fd3f7e3c5e
parentBumping the interface number down again, because this *may* not be a breaking... (diff)
parentno-op to poke panda (diff)
downloadopensim-SC_OLD-59b4cf2d5bc3077ba9c53b7ccea567537a16aa4e.zip
opensim-SC_OLD-59b4cf2d5bc3077ba9c53b7ccea567537a16aa4e.tar.gz
opensim-SC_OLD-59b4cf2d5bc3077ba9c53b7ccea567537a16aa4e.tar.bz2
opensim-SC_OLD-59b4cf2d5bc3077ba9c53b7ccea567537a16aa4e.tar.xz
Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim
-rw-r--r--OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs13
-rw-r--r--OpenSim/Framework/Tests/AgentCircuitDataTest.cs2
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs8
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs10
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs12
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs30
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs29
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs8
-rw-r--r--bin/OpenSim.ini.example47
-rw-r--r--prebuild.xml1
10 files changed, 122 insertions, 38 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs b/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
index 6214563..c53160f 100644
--- a/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
+++ b/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
@@ -33,6 +33,7 @@ using System.IO;
33using System.Net; 33using System.Net;
34using System.Reflection; 34using System.Reflection;
35using System.Text; 35using System.Text;
36using System.Web;
36using HttpServer; 37using HttpServer;
37using log4net; 38using log4net;
38 39
@@ -72,6 +73,18 @@ namespace OpenSim.Framework.Servers.HttpServer
72 } 73 }
73 private string _contentType; 74 private string _contentType;
74 75
76 public HttpCookieCollection Cookies
77 {
78 get
79 {
80 RequestCookies cookies = _request.Cookies;
81 HttpCookieCollection httpCookies = new HttpCookieCollection();
82 foreach (RequestCookie cookie in cookies)
83 httpCookies.Add(new HttpCookie(cookie.Name, cookie.Value));
84 return httpCookies;
85 }
86 }
87
75 public bool HasEntityBody 88 public bool HasEntityBody
76 { 89 {
77 get { return _request.ContentLength != 0; } 90 get { return _request.ContentLength != 0; }
diff --git a/OpenSim/Framework/Tests/AgentCircuitDataTest.cs b/OpenSim/Framework/Tests/AgentCircuitDataTest.cs
index 12b9cc1..ecd35c0 100644
--- a/OpenSim/Framework/Tests/AgentCircuitDataTest.cs
+++ b/OpenSim/Framework/Tests/AgentCircuitDataTest.cs
@@ -325,6 +325,8 @@ namespace OpenSim.Framework.Tests
325 { 325 {
326 //spurious litjson errors :P 326 //spurious litjson errors :P
327 map2 = map; 327 map2 = map;
328 Assert.That(1==1);
329 return;
328 } 330 }
329 331
330 AgentCircuitData Agent2Data = new AgentCircuitData(); 332 AgentCircuitData Agent2Data = new AgentCircuitData();
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index e28bc9a..7bc0b77 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -70,14 +70,14 @@ namespace OpenSim
70 70
71 protected bool m_autoCreateClientStack = true; 71 protected bool m_autoCreateClientStack = true;
72 72
73 /// <summary> 73 /// <value>
74 /// The file used to load and save prim backup xml if no filename has been specified 74 /// The file used to load and save prim backup xml if no filename has been specified
75 /// </summary> 75 /// </value>
76 protected const string DEFAULT_PRIM_BACKUP_FILENAME = "prim-backup.xml"; 76 protected const string DEFAULT_PRIM_BACKUP_FILENAME = "prim-backup.xml";
77 77
78 /// <summary> 78 /// <value>
79 /// The file used to load and save an opensimulator archive if no filename has been specified 79 /// The file used to load and save an opensimulator archive if no filename has been specified
80 /// </summary> 80 /// </value>
81 protected const string DEFAULT_OAR_BACKUP_FILENAME = "region.oar"; 81 protected const string DEFAULT_OAR_BACKUP_FILENAME = "region.oar";
82 82
83 public ConfigSettings ConfigurationSettings 83 public ConfigSettings ConfigurationSettings
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs
index f03e5fc..b61959f 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs
@@ -83,6 +83,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
83 83
84 internal string _accessPassword = String.Empty; 84 internal string _accessPassword = String.Empty;
85 internal Regex AccessPasswordRegex = null; 85 internal Regex AccessPasswordRegex = null;
86 internal List<string> ExcludeList = new List<string>();
86 internal string AccessPassword 87 internal string AccessPassword
87 { 88 {
88 get { return _accessPassword; } 89 get { return _accessPassword; }
@@ -210,8 +211,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
210 m_log.DebugFormat("[IRC-Channel-{0}] PingDelay : <{1}>", cs.idn, cs.PingDelay); 211 m_log.DebugFormat("[IRC-Channel-{0}] PingDelay : <{1}>", cs.idn, cs.PingDelay);
211 cs.AccessPassword = Substitute(rs, config.GetString("access_password", cs.AccessPassword)); 212 cs.AccessPassword = Substitute(rs, config.GetString("access_password", cs.AccessPassword));
212 m_log.DebugFormat("[IRC-Channel-{0}] AccessPassword : <{1}>", cs.idn, cs.AccessPassword); 213 m_log.DebugFormat("[IRC-Channel-{0}] AccessPassword : <{1}>", cs.idn, cs.AccessPassword);
213 214 string[] excludes = config.GetString("exclude_list", "").Trim().Split(new Char[] { ',' });
214 215 cs.ExcludeList = new List<string>(excludes.Length);
216 foreach(string name in excludes)
217 {
218 cs.ExcludeList.Add(name.Trim().ToLower());
219 }
220
215 // Fail if fundamental information is still missing 221 // Fail if fundamental information is still missing
216 222
217 if (cs.Server == null || cs.IrcChannel == null || cs.BaseNickname == null || cs.User == null) 223 if (cs.Server == null || cs.IrcChannel == null || cs.BaseNickname == null || cs.User == null)
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs
index 203948e..c49d942 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs
@@ -145,7 +145,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
145 if (enabled && (cs.irc.Enabled) && (cs.irc.Connected) && (cs.ClientReporting)) 145 if (enabled && (cs.irc.Enabled) && (cs.irc.Connected) && (cs.ClientReporting))
146 { 146 {
147 m_log.InfoFormat("[IRC-Region {0}]: {1} has left", Region, client.Name); 147 m_log.InfoFormat("[IRC-Region {0}]: {1} has left", Region, client.Name);
148 cs.irc.PrivMsg(cs.NoticeMessageFormat, cs.irc.Nick, Region, String.Format("{0} has left", client.Name)); 148 //Check if this person is excluded from IRC
149 if (!cs.ExcludeList.Contains(client.Name.ToLower()))
150 {
151 cs.irc.PrivMsg(cs.NoticeMessageFormat, cs.irc.Nick, Region, String.Format("{0} has left", client.Name));
152 }
149 } 153 }
150 client.OnLogout -= OnClientLoggedOut; 154 client.OnLogout -= OnClientLoggedOut;
151 client.OnConnectionClosed -= OnClientLoggedOut; 155 client.OnConnectionClosed -= OnClientLoggedOut;
@@ -209,7 +213,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
209 { 213 {
210 string clientName = String.Format("{0} {1}", presence.Firstname, presence.Lastname); 214 string clientName = String.Format("{0} {1}", presence.Firstname, presence.Lastname);
211 m_log.DebugFormat("[IRC-Region {0}] {1} has arrived", Region, clientName); 215 m_log.DebugFormat("[IRC-Region {0}] {1} has arrived", Region, clientName);
212 cs.irc.PrivMsg(cs.NoticeMessageFormat, cs.irc.Nick, Region, String.Format("{0} has arrived", clientName)); 216 //Check if this person is excluded from IRC
217 if (!cs.ExcludeList.Contains(clientName.ToLower()))
218 {
219 cs.irc.PrivMsg(cs.NoticeMessageFormat, cs.irc.Nick, Region, String.Format("{0} has arrived", clientName));
220 }
213 } 221 }
214 } 222 }
215 } 223 }
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs
index 9042e0d..bf523dd 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs
@@ -211,25 +211,39 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
211 { 211 {
212 if (script.StartsWith("//MRM:C#")) 212 if (script.StartsWith("//MRM:C#"))
213 { 213 {
214 if (m_scene.GetSceneObjectPart(localID).OwnerID != m_scene.RegionInfo.MasterAvatarAssignedUUID 214 if (m_config.GetBoolean("OwnerOnly", true))
215 || 215 if (m_scene.GetSceneObjectPart(localID).OwnerID != m_scene.RegionInfo.MasterAvatarAssignedUUID
216 m_scene.GetSceneObjectPart(localID).CreatorID != m_scene.RegionInfo.MasterAvatarAssignedUUID) 216 || m_scene.GetSceneObjectPart(localID).CreatorID != m_scene.RegionInfo.MasterAvatarAssignedUUID)
217 return; 217 return;
218 218
219 script = ConvertMRMKeywords(script); 219 script = ConvertMRMKeywords(script);
220 220
221 try 221 try
222 { 222 {
223 m_log.Info("[MRM] Found C# MRM - Starting in AppDomain with " + m_config.GetString("permissionLevel", "Internet") + "-level security."); 223 AppDomain target;
224 if (m_config.GetBoolean("Sandboxed", true))
225 {
226 m_log.Info("[MRM] Found C# MRM - Starting in AppDomain with " +
227 m_config.GetString("SandboxLevel", "Internet") + "-level security.");
224 228
225 string domainName = UUID.Random().ToString(); 229 string domainName = UUID.Random().ToString();
226 AppDomain target = CreateRestrictedDomain(m_config.GetString("permissionLevel", "Internet"), 230 target = CreateRestrictedDomain(m_config.GetString("SandboxLevel", "Internet"),
227 domainName); 231 domainName);
232 }
233 else
234 {
235 m_log.Info("[MRM] Found C# MRM - Starting in current AppDomain");
236 m_log.Warn(
237 "[MRM] Security Risk: AppDomain is run in current context. Use only in trusted environments.");
238 target = AppDomain.CurrentDomain;
239 }
228 240
241 m_log.Info("[MRM] Unwrapping into target AppDomain");
229 MRMBase mmb = (MRMBase) target.CreateInstanceFromAndUnwrap( 242 MRMBase mmb = (MRMBase) target.CreateInstanceFromAndUnwrap(
230 CompileFromDotNetText(script, itemID.ToString()), 243 CompileFromDotNetText(script, itemID.ToString()),
231 "OpenSim.MiniModule"); 244 "OpenSim.MiniModule");
232 245
246 m_log.Info("[MRM] Initialising MRM Globals");
233 InitializeMRM(mmb, localID, itemID); 247 InitializeMRM(mmb, localID, itemID);
234 248
235 m_scripts[itemID] = mmb; 249 m_scripts[itemID] = mmb;
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs
index 68f2f52..0cba6af 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs
@@ -91,24 +91,45 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
91 public bool Bright 91 public bool Bright
92 { 92 {
93 get { return GetTexface().Fullbright; } 93 get { return GetTexface().Fullbright; }
94 set { throw new System.NotImplementedException(); } 94 set
95 {
96 Primitive.TextureEntry tex = m_parent.Shape.Textures;
97 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face);
98 texface.Fullbright = value;
99 tex.FaceTextures[m_face] = texface;
100 m_parent.UpdateTexture(tex);
101 }
95 } 102 }
96 103
97 public double Bloom 104 public double Bloom
98 { 105 {
99 get { return GetTexface().Glow; } 106 get { return GetTexface().Glow; }
100 set { throw new System.NotImplementedException(); } 107 set
108 {
109 Primitive.TextureEntry tex = m_parent.Shape.Textures;
110 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face);
111 texface.Glow = (float) value;
112 tex.FaceTextures[m_face] = texface;
113 m_parent.UpdateTexture(tex);
114 }
101 } 115 }
102 116
103 public bool Shiny 117 public bool Shiny
104 { 118 {
105 get { return GetTexface().Shiny != Shininess.None; } 119 get { return GetTexface().Shiny != Shininess.None; }
106 set { throw new System.NotImplementedException(); } 120 set
121 {
122 Primitive.TextureEntry tex = m_parent.Shape.Textures;
123 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face);
124 texface.Shiny = value ? Shininess.High : Shininess.None;
125 tex.FaceTextures[m_face] = texface;
126 m_parent.UpdateTexture(tex);
127 }
107 } 128 }
108 129
109 public bool BumpMap 130 public bool BumpMap
110 { 131 {
111 get { throw new System.NotImplementedException(); } 132 get { return GetTexface().Bump == Bumpiness.None; }
112 set { throw new System.NotImplementedException(); } 133 set { throw new System.NotImplementedException(); }
113 } 134 }
114 } 135 }
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
index 4600836..4427426 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
@@ -25,17 +25,13 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System;
29using System.Reflection;
30using System.Collections; 28using System.Collections;
31using System.Collections.Generic; 29using System.Collections.Generic;
32 30using System.Security;
33using OpenMetaverse; 31using OpenMetaverse;
34using OpenSim.Region.Framework.Scenes; 32using OpenSim.Region.Framework.Scenes;
35using OpenSim.Region.Framework.Interfaces; 33using OpenSim.Region.Framework.Interfaces;
36 34
37using log4net;
38
39namespace OpenSim.Region.OptionalModules.Scripting.Minimodule 35namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
40{ 36{
41 class SPAvatar : System.MarshalByRefObject, IAvatar 37 class SPAvatar : System.MarshalByRefObject, IAvatar
@@ -60,7 +56,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
60 public string Name 56 public string Name
61 { 57 {
62 get { return GetSP().Name; } 58 get { return GetSP().Name; }
63 set { throw new InvalidOperationException("Avatar Names are a read-only property."); } 59 set { throw new SecurityException("Avatar Names are a read-only property."); }
64 } 60 }
65 61
66 public UUID GlobalID 62 public UUID GlobalID
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index a1532c5..9a17c58 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -679,16 +679,21 @@
679 ;relay_chat = true 679 ;relay_chat = true
680 ;access_password = foobar 680 ;access_password = foobar
681 681
682 ;fallback_region = name of "default" region 682 ;;fallback_region = name of "default" region
683 ;MSGformat fields : 0=botnick, 1=user, 2=region, 3=message 683 ;;MSGformat fields : 0=botnick, 1=user, 2=region, 3=message
684 ; must start with "PRIVMSG {0} : " or irc server will get upset 684 ;; must start with "PRIVMSG {0} : " or irc server will get upset
685 ;for <bot>:<user in region> :<message> 685 ;;for <bot>:<user in region> :<message>
686 ;msgformat = "PRIVMSG {0} :<{1} in {2}>: {3}" 686 ;;msgformat = "PRIVMSG {0} :<{1} in {2}>: {3}"
687 ;for <bot>:<message> - <user of region> : 687 ;;for <bot>:<message> - <user of region> :
688 msgformat = "PRIVMSG {0} : {3} - {1} of {2}" 688 ;msgformat = "PRIVMSG {0} : {3} - {1} of {2}"
689 ;for <bot>:<message> - from <user> : 689 ;;for <bot>:<message> - from <user> :
690 ;msgformat = "PRIVMSG {0} : {3} - from {1}" 690 ;;msgformat = "PRIVMSG {0} : {3} - from {1}"
691 691
692 ;; exclude_list allows you to stop the IRC connector from announcing the
693 ;;arrival and departure of certain users. For example: admins, bots.
694
695 ;exclude_list=User 1,User 2,User 3
696
692 697
693;[CMS] 698;[CMS]
694 ;enabled = true 699 ;enabled = true
@@ -1163,10 +1168,28 @@
1163 1168
1164 1169
1165[MRM] 1170[MRM]
1166 ; Enables the Mini Region Modules Script Engine. WARNING: SECURITY RISK. 1171 ; Enables the Mini Region Modules Script Engine.
1167 ; default is false 1172 ; default is false
1168 Enabled = false 1173 Enabled = false
1169 1174
1175 ; Runs MRM in a Security Sandbox
1176 ; WARNING: DISABLING IS A SECURITY RISK.
1177 Sandboxed = true
1178
1179 ; The level sandbox to use, adjust at your OWN RISK.
1180 ; Valid values are:
1181 ; * FullTrust
1182 ; * SkipVerification
1183 ; * Execution
1184 ; * Nothing
1185 ; * LocalIntranet
1186 ; * Internet
1187 ; * Everything
1188 SandboxLevel = "Internet"
1189
1190 ; Only allow Region Owners to run MRMs
1191 ; May represent a security risk if you disable this.
1192 OwnerOnly = true
1170 1193
1171[Hypergrid] 1194[Hypergrid]
1172 ; Keep it false for now. Making it true requires the use of a special client in order to access inventory 1195 ; Keep it false for now. Making it true requires the use of a special client in order to access inventory
diff --git a/prebuild.xml b/prebuild.xml
index 6401ff0..5e44169 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -70,6 +70,7 @@
70 <ReferencePath>../../../../bin/</ReferencePath> 70 <ReferencePath>../../../../bin/</ReferencePath>
71 <Reference name="System"/> 71 <Reference name="System"/>
72 <Reference name="System.Xml"/> 72 <Reference name="System.Xml"/>
73 <Reference name="System.Web"/>
73 <Reference name="OpenMetaverse.StructuredData.dll"/> 74 <Reference name="OpenMetaverse.StructuredData.dll"/>
74 <Reference name="OpenMetaverseTypes.dll"/> 75 <Reference name="OpenMetaverseTypes.dll"/>
75 <Reference name="XMLRPC.dll"/> 76 <Reference name="XMLRPC.dll"/>