aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/ServiceAuth/ServiceAuth.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2015-03-04 17:51:11 +0000
committerJustin Clark-Casey (justincc)2015-03-04 18:27:51 +0000
commit3255335c42ff348465d235a3ccf9558d0d6d414b (patch)
tree5537a8bb51ef79f1b42a0a29e167da939630f434 /OpenSim/Framework/ServiceAuth/ServiceAuth.cs
parentAdd outbound URL filter to llHttpRequest() and osSetDynamicTextureURL*() scri... (diff)
downloadopensim-SC_OLD-3255335c42ff348465d235a3ccf9558d0d6d414b.zip
opensim-SC_OLD-3255335c42ff348465d235a3ccf9558d0d6d414b.tar.gz
opensim-SC_OLD-3255335c42ff348465d235a3ccf9558d0d6d414b.tar.bz2
opensim-SC_OLD-3255335c42ff348465d235a3ccf9558d0d6d414b.tar.xz
Make private services forbid llHTTPRequest() calls by rejecting those that have the X-SecondLife-Shard header.
If you need to enable this, set AllowHttpRequestIn = true in [Network] for all private services or individual [*Service] sections.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/ServiceAuth/ServiceAuth.cs18
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