aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authoruriesk2018-12-08 19:26:17 +0100
committerUbitUmarov2018-12-11 14:18:55 +0000
commit34b7d7ec6e8fcdf3e42a17ded470b561578b6f4e (patch)
tree791c6e60ac1c114c3b09031e1638e181596736b6 /OpenSim
parentYengine reset global variables possible damaged by bad state file (diff)
downloadopensim-SC-34b7d7ec6e8fcdf3e42a17ded470b561578b6f4e.zip
opensim-SC-34b7d7ec6e8fcdf3e42a17ded470b561578b6f4e.tar.gz
opensim-SC-34b7d7ec6e8fcdf3e42a17ded470b561578b6f4e.tar.bz2
opensim-SC-34b7d7ec6e8fcdf3e42a17ded470b561578b6f4e.tar.xz
Remove OpenID cookie check (agni_sl_session_id) from *SetContentType Remove commented out second llSetContentType thats the same as osSetContentType anyway
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs31
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs13
2 files changed, 0 insertions, 44 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
index 5e8cd8e..cb8d4c8 100644
--- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
@@ -69,7 +69,6 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
69 public int startTime; 69 public int startTime;
70 public bool responseSent; 70 public bool responseSent;
71 public string uri; 71 public string uri;
72 public bool allowResponseType = false;
73 public UUID hostID; 72 public UUID hostID;
74 public Scene scene; 73 public Scene scene;
75 } 74 }
@@ -383,10 +382,6 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
383 { 382 {
384 string responseBody = body; 383 string responseBody = body;
385 384
386 // If we have no OpenID from built-in browser, disable this
387 if (!urlData.requests[request].allowResponseType)
388 urlData.requests[request].responseType = "text/plain";
389
390 if (urlData.requests[request].responseType.Equals("text/plain")) 385 if (urlData.requests[request].responseType.Equals("text/plain"))
391 { 386 {
392 string value; 387 string value;
@@ -703,32 +698,6 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
703 string key = (string)header.Key; 698 string key = (string)header.Key;
704 string value = (string)header.Value; 699 string value = (string)header.Value;
705 requestData.headers.Add(key, value); 700 requestData.headers.Add(key, value);
706 if (key == "cookie")
707 {
708 string[] parts = value.Split(new char[] {'='});
709 if (parts[0] == "agni_sl_session_id" && parts.Length > 1)
710 {
711 string cookie = Uri.UnescapeDataString(parts[1]);
712 string[] crumbs = cookie.Split(new char[] {':'});
713 UUID owner;
714 if (crumbs.Length == 2 && UUID.TryParse(crumbs[0], out owner))
715 {
716 if (crumbs[1].Length == 32)
717 {
718 Scene scene = requestData.scene;
719 if (scene != null)
720 {
721 SceneObjectPart host = scene.GetSceneObjectPart(requestData.hostID);
722 if (host != null)
723 {
724 if (host.OwnerID == owner)
725 requestData.allowResponseType = true;
726 }
727 }
728 }
729 }
730 }
731 }
732 } 701 }
733 foreach (DictionaryEntry de in request) 702 foreach (DictionaryEntry de in request)
734 { 703 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 8987a8d..a63ce64 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2041,19 +2041,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2041 } 2041 }
2042 } 2042 }
2043 2043
2044/*
2045 public void llSetContentType(LSL_Key id, LSL_Integer content_type)
2046 {
2047 if (m_UrlModule != null)
2048 {
2049 string type = "text.plain";
2050 if (content_type == (int)ScriptBaseClass.CONTENT_TYPE_HTML)
2051 type = "text/html";
2052
2053 m_UrlModule.HttpContentType(new UUID(id),type);
2054 }
2055 }
2056*/
2057 public void SetTexGen(SceneObjectPart part, int face,int style) 2044 public void SetTexGen(SceneObjectPart part, int face,int style)
2058 { 2045 {
2059 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) 2046 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)