aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Base
diff options
context:
space:
mode:
authorMelanie2009-09-04 07:03:43 +0100
committerMelanie2009-09-04 07:03:43 +0100
commit11700ba4a4e35cf7512f7f6e8b9b8e54e812f574 (patch)
tree683c464db85a52aa0b176c8f2d9ec91df9f94c1d /OpenSim/Server/Base
parentMore work on new authentication service (diff)
downloadopensim-SC_OLD-11700ba4a4e35cf7512f7f6e8b9b8e54e812f574.zip
opensim-SC_OLD-11700ba4a4e35cf7512f7f6e8b9b8e54e812f574.tar.gz
opensim-SC_OLD-11700ba4a4e35cf7512f7f6e8b9b8e54e812f574.tar.bz2
opensim-SC_OLD-11700ba4a4e35cf7512f7f6e8b9b8e54e812f574.tar.xz
Implement plain password authentication partway. Tested, but no user
functionality yet.
Diffstat (limited to 'OpenSim/Server/Base')
-rw-r--r--OpenSim/Server/Base/ServerUtils.cs29
1 files changed, 28 insertions, 1 deletions
diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs
index 8d76ffe..0a36bbe 100644
--- a/OpenSim/Server/Base/ServerUtils.cs
+++ b/OpenSim/Server/Base/ServerUtils.cs
@@ -31,6 +31,7 @@ using System.Reflection;
31using System.Xml; 31using System.Xml;
32using System.Xml.Serialization; 32using System.Xml.Serialization;
33using System.Text; 33using System.Text;
34using System.Collections.Generic;
34using log4net; 35using log4net;
35using OpenSim.Framework; 36using OpenSim.Framework;
36 37
@@ -156,5 +157,31 @@ namespace OpenSim.Server.Base
156 return null; 157 return null;
157 } 158 }
158 } 159 }
160
161 public static Dictionary<string, string> ParseQueryString(string query)
162 {
163 Dictionary<string, string> result = new Dictionary<string, string>();
164 string[] terms = query.Split(new char[] {'&'});
165
166 if (terms.Length == 0)
167 return result;
168
169 foreach (string t in terms)
170 {
171 string[] elems = t.Split(new char[] {'='});
172 if (elems.Length == 0)
173 continue;
174
175 string name = System.Web.HttpUtility.UrlDecode(elems[0]);
176 string value = String.Empty;
177
178 if (elems.Length > 1)
179 value = System.Web.HttpUtility.UrlDecode(elems[1]);
180
181 result[name] = value;
182 }
183
184 return result;
185 }
159 } 186 }
160} \ No newline at end of file 187}