Implement plain password authentication partway. Tested, but no user

functionality yet.
This commit is contained in:
Melanie
2009-09-04 07:03:43 +01:00
parent c9a24ece54
commit 11700ba4a4
8 changed files with 299 additions and 26 deletions

View File

@@ -31,6 +31,7 @@ using System.Reflection;
using System.Xml;
using System.Xml.Serialization;
using System.Text;
using System.Collections.Generic;
using log4net;
using OpenSim.Framework;
@@ -156,5 +157,31 @@ namespace OpenSim.Server.Base
return null;
}
}
public static Dictionary<string, string> ParseQueryString(string query)
{
Dictionary<string, string> result = new Dictionary<string, string>();
string[] terms = query.Split(new char[] {'&'});
if (terms.Length == 0)
return result;
foreach (string t in terms)
{
string[] elems = t.Split(new char[] {'='});
if (elems.Length == 0)
continue;
string name = System.Web.HttpUtility.UrlDecode(elems[0]);
string value = String.Empty;
if (elems.Length > 1)
value = System.Web.HttpUtility.UrlDecode(elems[1]);
result[name] = value;
}
return result;
}
}
}
}