From c14c4bc1ec5f381aa754068caf460c95e4539b17 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 24 Sep 2011 01:39:37 +0100 Subject: [PATCH] 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. --- .../RemoteAuthorizationServiceConnector.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs index 003324fb14..86c0099c68 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs @@ -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 {