mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
* Fixed UserServer crash when it's passed 00000000000000000000000000 as the UUID.
* It turns out that by proxy, this means that you won't have to look up people's UUID anymore in grid mode, If the UUID is LLUUID.Zero, it tries to look up avatar by name.
This commit is contained in:
@@ -156,8 +156,22 @@ namespace OpenSim.Grid.UserServer
|
||||
UserProfileData userProfile;
|
||||
if (requestData.Contains("avatar_name"))
|
||||
{
|
||||
userProfile = GetUserProfile((string) requestData["avatar_name"]);
|
||||
if (userProfile == null)
|
||||
string query = (string)requestData["avatar_name"];
|
||||
|
||||
System.Text.RegularExpressions.Regex objAlphaNumericPattern = new System.Text.RegularExpressions.Regex("[^a-zA-Z0-9]");
|
||||
|
||||
string[] querysplit;
|
||||
querysplit = query.Split(' ');
|
||||
|
||||
if (querysplit.Length == 2)
|
||||
{
|
||||
userProfile = GetUserProfile(querysplit[0],querysplit[1]);
|
||||
if (userProfile == null)
|
||||
{
|
||||
return CreateUnknownUserErrorResponse();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return CreateUnknownUserErrorResponse();
|
||||
}
|
||||
@@ -179,7 +193,18 @@ namespace OpenSim.Grid.UserServer
|
||||
//CFK: Console.WriteLine("METHOD BY UUID CALLED");
|
||||
if (requestData.Contains("avatar_uuid"))
|
||||
{
|
||||
userProfile = GetUserProfile((LLUUID) (string) requestData["avatar_uuid"]);
|
||||
LLUUID guess = new LLUUID();
|
||||
try
|
||||
{
|
||||
guess = new LLUUID((string)requestData["avatar_uuid"]);
|
||||
|
||||
userProfile = GetUserProfile(guess);
|
||||
}
|
||||
catch (System.FormatException)
|
||||
{
|
||||
return CreateUnknownUserErrorResponse();
|
||||
}
|
||||
|
||||
if (userProfile == null)
|
||||
{
|
||||
return CreateUnknownUserErrorResponse();
|
||||
|
||||
Reference in New Issue
Block a user