mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 18:25:33 +08:00
verify user service urls with same rules
This commit is contained in:
@@ -474,10 +474,14 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||
|
||||
if (userdata.ServerURLs != null)
|
||||
{
|
||||
if(userdata.ServerURLs.ContainsKey(serverType) && userdata.ServerURLs[serverType] != null)
|
||||
return userdata.ServerURLs[serverType].ToString();
|
||||
else
|
||||
return string.Empty;
|
||||
if(userdata.ServerURLs.TryGetValue(serverType, out object ourl) && ourl != null)
|
||||
{
|
||||
string turl = ourl as string;
|
||||
OSHHTPHost otmp = new OSHHTPHost(turl);
|
||||
if (otmp.IsValidHost)
|
||||
return otmp.URI;
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(userdata.HomeURL))
|
||||
@@ -504,7 +508,12 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||
}
|
||||
|
||||
if (userdata.ServerURLs != null && userdata.ServerURLs.TryGetValue(serverType, out object ourl) && ourl != null)
|
||||
return ourl.ToString();
|
||||
{
|
||||
string turl = ourl as string;
|
||||
OSHHTPHost otmp = new OSHHTPHost(turl);
|
||||
if (otmp.IsValidHost)
|
||||
return otmp.URI;
|
||||
}
|
||||
}
|
||||
}
|
||||
return string.Empty;
|
||||
@@ -535,10 +544,14 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||
|
||||
if (userdata.ServerURLs != null)
|
||||
{
|
||||
if (userdata.ServerURLs.ContainsKey(serverType) && userdata.ServerURLs[serverType] != null)
|
||||
return userdata.ServerURLs[serverType].ToString();
|
||||
else
|
||||
return string.Empty;
|
||||
if (userdata.ServerURLs.TryGetValue(serverType, out object ourl) && ourl != null)
|
||||
{
|
||||
string turl = ourl as string;
|
||||
OSHHTPHost otmp = new OSHHTPHost(turl);
|
||||
if (otmp.IsValidHost)
|
||||
return otmp.URI;
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
if (!recentFail && !string.IsNullOrEmpty(userdata.HomeURL))
|
||||
@@ -568,8 +581,13 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||
recentFail = true;
|
||||
}
|
||||
|
||||
if (userdata.ServerURLs != null && userdata.ServerURLs.ContainsKey(serverType) && userdata.ServerURLs[serverType] != null)
|
||||
return userdata.ServerURLs[serverType].ToString();
|
||||
if (userdata.ServerURLs != null && userdata.ServerURLs.TryGetValue(serverType, out object ourl) && ourl != null)
|
||||
{
|
||||
string turl = ourl as string;
|
||||
OSHHTPHost otmp = new OSHHTPHost(turl);
|
||||
if (otmp.IsValidHost)
|
||||
return otmp.URI;
|
||||
}
|
||||
}
|
||||
}
|
||||
return string.Empty;
|
||||
|
||||
Reference in New Issue
Block a user