Don't try and resolve user account for authorization if the agent has come in via hypergrid.
If a user account isn't available, this just passes on the name given by the agent instead. I'm not sure this is particularly useful since I believe that agent names could be faked in this context - it might be no more useful than a viewer agent string. In fact, there might even be an argument that passing on this name provides a false expectation of authenticity. However, I will apply for now. Patch applied from http://opensimulator.org/mantis/view.php?id=5696 Thanks Michelle Argus.remove-scene-viewer
parent
839c1cdcc4
commit
c14c4bc1ec
|
@ -141,11 +141,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
|
|||
|
||||
if (scene != null)
|
||||
{
|
||||
string mail = String.Empty;
|
||||
|
||||
UserAccount account = scene.UserAccountService.GetUserAccount(UUID.Zero, new UUID(userID));
|
||||
|
||||
//if account not found, we assume its a foreign visitor from HG, else use account data...
|
||||
if (account != null)
|
||||
{
|
||||
mail = account.Email;
|
||||
firstName = account.FirstName;
|
||||
lastName = account.LastName;
|
||||
}
|
||||
|
||||
isAuthorized
|
||||
= IsAuthorizedForRegion(
|
||||
userID, firstName, lastName, account.Email, scene.RegionInfo.RegionName, regionID, out message);
|
||||
userID, firstName, lastName, mail, scene.RegionInfo.RegionName, regionID, out message);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue