From e12c044eabf223828d00a1ac45a8ed43215b882b Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 25 Mar 2014 00:19:24 +0000 Subject: [PATCH] Don't fail to enable permissions modules correctly if there is any leading or trailing whitespace between comma separate module combinations. --- .../CoreModules/World/Permissions/PermissionsModule.cs | 3 ++- .../OptionalModules/PrimLimitsModule/PrimLimitsModule.cs | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 45617fc1cd..89e2b5521f 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -27,6 +27,7 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Reflection; using log4net; using Nini.Config; @@ -160,7 +161,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions string permissionModules = Util.GetConfigVarFromSections(config, "permissionmodules", new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule"); - List modules = new List(permissionModules.Split(',')); + List modules = new List(permissionModules.Split(',').Select(m => m.Trim())); if (!modules.Contains("DefaultPermissionsModule")) return; diff --git a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs index a6d43f1cff..8b4d231eed 100644 --- a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs +++ b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs @@ -26,8 +26,9 @@ */ using System; -using System.Reflection; using System.Collections.Generic; +using System.Linq; +using System.Reflection; using log4net; using Mono.Addins; using Nini.Config; @@ -62,7 +63,7 @@ namespace OpenSim.Region.OptionalModules string permissionModules = Util.GetConfigVarFromSections(config, "permissionmodules", new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule"); - List modules=new List(permissionModules.Split(',')); + List modules = new List(permissionModules.Split(',').Select(m => m.Trim())); if(!modules.Contains("PrimLimitsModule")) return;