From 8ccc470e2a40e95a654011be939700e68236a52a Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Fri, 11 Jan 2008 07:41:14 +0000 Subject: [PATCH] * quick fix to fix if webLoginKey is null in DB, return random key (I guess LLUUID.Zero would be a security hazard) --- OpenSim/Framework/Data.MySQL/MySQLManager.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/OpenSim/Framework/Data.MySQL/MySQLManager.cs b/OpenSim/Framework/Data.MySQL/MySQLManager.cs index 223d902a1d..1032145625 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLManager.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLManager.cs @@ -446,7 +446,15 @@ namespace OpenSim.Framework.Data.MySQL retval.profileImage = new LLUUID((string) reader["profileImage"]); retval.profileFirstImage = new LLUUID((string) reader["profileFirstImage"]); - retval.webLoginKey = new LLUUID((string)reader["webLoginKey"]); + + if( reader.IsDBNull( reader.GetOrdinal( "webLoginKey" ) ) ) + { + retval.webLoginKey = LLUUID.Random(); + } + else + { + retval.webLoginKey = new LLUUID((string)reader["webLoginKey"]); + } } else {