diff options
author | BlueWall | 2015-03-04 14:02:35 -0500 |
---|---|---|
committer | BlueWall | 2015-03-04 14:02:35 -0500 |
commit | 369ccaf1eb0f2cf235108b6534d4207cfbf520e9 (patch) | |
tree | c916dd429b9a9b494b27fe87563ef31d399c9403 /OpenSim/Framework/ServiceAuth/ServiceAuth.cs | |
parent | One more migration fix (diff) | |
parent | Make private services forbid llHTTPRequest() calls by rejecting those that ha... (diff) | |
download | opensim-SC-369ccaf1eb0f2cf235108b6534d4207cfbf520e9.zip opensim-SC-369ccaf1eb0f2cf235108b6534d4207cfbf520e9.tar.gz opensim-SC-369ccaf1eb0f2cf235108b6534d4207cfbf520e9.tar.bz2 opensim-SC-369ccaf1eb0f2cf235108b6534d4207cfbf520e9.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/ServiceAuth/ServiceAuth.cs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/OpenSim/Framework/ServiceAuth/ServiceAuth.cs b/OpenSim/Framework/ServiceAuth/ServiceAuth.cs index 5ab613b..30f5bd6 100644 --- a/OpenSim/Framework/ServiceAuth/ServiceAuth.cs +++ b/OpenSim/Framework/ServiceAuth/ServiceAuth.cs | |||
@@ -36,15 +36,27 @@ namespace OpenSim.Framework.ServiceAuth | |||
36 | { | 36 | { |
37 | public static IServiceAuth Create(IConfigSource config, string section) | 37 | public static IServiceAuth Create(IConfigSource config, string section) |
38 | { | 38 | { |
39 | CompoundAuthentication compoundAuth = new CompoundAuthentication(); | ||
40 | |||
41 | bool allowLlHttpRequestIn | ||
42 | = Util.GetConfigVarFromSections<bool>(config, "AllowllHTTPRequestIn", new string[] { "Network", section }, false); | ||
43 | |||
44 | if (!allowLlHttpRequestIn) | ||
45 | compoundAuth.AddAuthenticator(new DisallowLlHttpRequest()); | ||
46 | |||
39 | string authType = Util.GetConfigVarFromSections<string>(config, "AuthType", new string[] { "Network", section }, "None"); | 47 | string authType = Util.GetConfigVarFromSections<string>(config, "AuthType", new string[] { "Network", section }, "None"); |
40 | 48 | ||
41 | switch (authType) | 49 | switch (authType) |
42 | { | 50 | { |
43 | case "BasicHttpAuthentication": | 51 | case "BasicHttpAuthentication": |
44 | return new BasicHttpAuthentication(config, section); | 52 | compoundAuth.AddAuthenticator(new BasicHttpAuthentication(config, section)); |
53 | break; | ||
45 | } | 54 | } |
46 | 55 | ||
47 | return null; | 56 | if (compoundAuth.Count > 0) |
57 | return compoundAuth; | ||
58 | else | ||
59 | return null; | ||
48 | } | 60 | } |
49 | } | 61 | } |
50 | } | 62 | } \ No newline at end of file |