mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
* Thanks to Mic Bowman for inspiring me to look at that we are still using ASCIIEncoder in places we shouldn't.
This commit is contained in:
@@ -224,7 +224,7 @@ namespace OpenSim.Data.SQLite
|
||||
public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge)
|
||||
{
|
||||
SHA512Managed HashProvider = new SHA512Managed();
|
||||
ASCIIEncoding TextProvider = new ASCIIEncoding();
|
||||
Encoding TextProvider = new UTF8Encoding();
|
||||
|
||||
byte[] stream = TextProvider.GetBytes(uuid.ToString() + ":" + handle.ToString() + ":" + challenge);
|
||||
byte[] hash = HashProvider.ComputeHash(stream);
|
||||
|
||||
@@ -1223,22 +1223,6 @@ namespace OpenSim.Data.SQLite
|
||||
s.TextureEntry = textureEntry;
|
||||
|
||||
s.ExtraParams = (byte[]) row["ExtraParams"];
|
||||
// System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
|
||||
// string texture = encoding.GetString((Byte[])row["Texture"]);
|
||||
// if (!texture.StartsWith("<"))
|
||||
// {
|
||||
// //here so that we can still work with old format database files (ie from before I added xml serialization)
|
||||
// LLObject.TextureEntry textureEntry = null;
|
||||
// textureEntry = new LLObject.TextureEntry(new LLUUID(texture));
|
||||
// s.TextureEntry = textureEntry.ToBytes();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// TextureBlock textureEntry = TextureBlock.FromXmlString(texture);
|
||||
// s.TextureEntry = textureEntry.TextureData;
|
||||
// s.ExtraParams = textureEntry.ExtraParams;
|
||||
// }
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user