diff options
author | Melanie | 2009-09-04 07:03:43 +0100 |
---|---|---|
committer | Melanie | 2009-09-04 07:03:43 +0100 |
commit | 11700ba4a4e35cf7512f7f6e8b9b8e54e812f574 (patch) | |
tree | 683c464db85a52aa0b176c8f2d9ec91df9f94c1d /OpenSim/Server/Base/ServerUtils.cs | |
parent | More work on new authentication service (diff) | |
download | opensim-SC-11700ba4a4e35cf7512f7f6e8b9b8e54e812f574.zip opensim-SC-11700ba4a4e35cf7512f7f6e8b9b8e54e812f574.tar.gz opensim-SC-11700ba4a4e35cf7512f7f6e8b9b8e54e812f574.tar.bz2 opensim-SC-11700ba4a4e35cf7512f7f6e8b9b8e54e812f574.tar.xz |
Implement plain password authentication partway. Tested, but no user
functionality yet.
Diffstat (limited to 'OpenSim/Server/Base/ServerUtils.cs')
-rw-r--r-- | OpenSim/Server/Base/ServerUtils.cs | 29 |
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; | |||
31 | using System.Xml; | 31 | using System.Xml; |
32 | using System.Xml.Serialization; | 32 | using System.Xml.Serialization; |
33 | using System.Text; | 33 | using System.Text; |
34 | using System.Collections.Generic; | ||
34 | using log4net; | 35 | using log4net; |
35 | using OpenSim.Framework; | 36 | using 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 | } |