a few changes. in same cases http/https can't be determined. possible both need to be present, possible with http a redir to https. TODO

This commit is contained in:
UbitUmarov
2024-08-17 00:30:18 +01:00
parent 207c3d1e71
commit 79dbca84f9
6 changed files with 92 additions and 99 deletions

View File

@@ -2481,7 +2481,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
UserAgentServiceConnector userConnection = new(serverURI);
if (userConnection is not null && serverURI.StartsWith("http://"))
if (userConnection is not null)
{
userID = userConnection.GetUUID(realFirstName, realLastName);
if (!userID.IsZero())
@@ -2490,21 +2490,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return userID.ToString();
}
}
else
{
// Override hardcoded http in Util.ParseForeignAvatarName
string SSLserverURI = serverURI.Replace("http://", "https://");
userConnection = new(SSLserverURI);
if (userConnection is not null)
{
userID = userConnection.GetUUID(realFirstName, realLastName);
if (!userID.IsZero())
{
userManager.AddUser(userID, realFirstName, realLastName, SSLserverURI);
return userID.ToString();
}
}
}
}
catch (Exception /*e*/)
{