aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorDiva Canto2014-05-22 10:16:19 -0700
committerDiva Canto2014-05-22 10:16:19 -0700
commitb7c7293c7aa7bb37085eaf6740e10a268aecf608 (patch)
tree55022934c63bea8fd9fbd31be2df016cf5593d9a /OpenSim/Region/CoreModules
parentFixed a problem with detaching attachments in situations where the user's ass... (diff)
parentFix mantis 6973. Prevent BOM being prefixed to message XML which was causing ... (diff)
downloadopensim-SC_OLD-b7c7293c7aa7bb37085eaf6740e10a268aecf608.zip
opensim-SC_OLD-b7c7293c7aa7bb37085eaf6740e10a268aecf608.tar.gz
opensim-SC_OLD-b7c7293c7aa7bb37085eaf6740e10a268aecf608.tar.bz2
opensim-SC_OLD-b7c7293c7aa7bb37085eaf6740e10a268aecf608.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs9
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs3
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/AuthorizationService.cs34
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs44
8 files changed, 64 insertions, 44 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
index 1ee2a7b..c4b5aac 100644
--- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
@@ -484,6 +484,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
484 { 484 {
485 remoteClient.SendAgentAlertMessage( 485 remoteClient.SendAgentAlertMessage(
486 "Error updating classified", false); 486 "Error updating classified", false);
487 return;
487 } 488 }
488 } 489 }
489 490
@@ -510,6 +511,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
510 { 511 {
511 remoteClient.SendAgentAlertMessage( 512 remoteClient.SendAgentAlertMessage(
512 "Error classified delete", false); 513 "Error classified delete", false);
514 return;
513 } 515 }
514 516
515 parameters = (OSDMap)Params; 517 parameters = (OSDMap)Params;
@@ -612,6 +614,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
612 { 614 {
613 remoteClient.SendAgentAlertMessage( 615 remoteClient.SendAgentAlertMessage(
614 "Error selecting pick", false); 616 "Error selecting pick", false);
617 return;
615 } 618 }
616 pick = (UserProfilePick) Pick; 619 pick = (UserProfilePick) Pick;
617 620
@@ -714,6 +717,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
714 { 717 {
715 remoteClient.SendAgentAlertMessage( 718 remoteClient.SendAgentAlertMessage(
716 "Error updating pick", false); 719 "Error updating pick", false);
720 return;
717 } 721 }
718 722
719 m_log.DebugFormat("[PROFILES]: Finish PickInfoUpdate {0} {1}", pick.Name, pick.PickId.ToString()); 723 m_log.DebugFormat("[PROFILES]: Finish PickInfoUpdate {0} {1}", pick.Name, pick.PickId.ToString());
@@ -740,6 +744,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
740 { 744 {
741 remoteClient.SendAgentAlertMessage( 745 remoteClient.SendAgentAlertMessage(
742 "Error picks delete", false); 746 "Error picks delete", false);
747 return;
743 } 748 }
744 } 749 }
745 #endregion Picks 750 #endregion Picks
@@ -807,6 +812,8 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
807 object Note = note; 812 object Note = note;
808 if(!rpc.JsonRpcRequest(ref Note, "avatar_notes_update", serverURI, UUID.Random().ToString())) 813 if(!rpc.JsonRpcRequest(ref Note, "avatar_notes_update", serverURI, UUID.Random().ToString()))
809 { 814 {
815 remoteClient.SendAgentAlertMessage(
816 "Error updating note", false);
810 return; 817 return;
811 } 818 }
812 } 819 }
@@ -916,6 +923,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
916 { 923 {
917 remoteClient.SendAgentAlertMessage( 924 remoteClient.SendAgentAlertMessage(
918 "Error updating interests", false); 925 "Error updating interests", false);
926 return;
919 } 927 }
920 } 928 }
921 929
@@ -1044,6 +1052,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1044 { 1052 {
1045 remoteClient.SendAgentAlertMessage( 1053 remoteClient.SendAgentAlertMessage(
1046 "Error updating properties", false); 1054 "Error updating properties", false);
1055 return;
1047 } 1056 }
1048 1057
1049 RequestAvatarProperties(remoteClient, newProfile.ID); 1058 RequestAvatarProperties(remoteClient, newProfile.ID);
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 539367d..e583590 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -761,12 +761,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
761 string reason; 761 string reason;
762 string version; 762 string version;
763 if (!Scene.SimulationService.QueryAccess( 763 if (!Scene.SimulationService.QueryAccess(
764 finalDestination, sp.ControllingClient.AgentId, homeURI, position, out version, out reason)) 764 finalDestination, sp.ControllingClient.AgentId, homeURI, true, position, out version, out reason))
765 { 765 {
766 sp.ControllingClient.SendTeleportFailed(reason); 766 sp.ControllingClient.SendTeleportFailed(reason);
767 767
768 m_log.DebugFormat( 768 m_log.DebugFormat(
769 "[ENTITY TRANSFER MODULE]: {0} was stopped from teleporting from {1} to {2} because {3}", 769 "[ENTITY TRANSFER MODULE]: {0} was stopped from teleporting from {1} to {2} because: {3}",
770 sp.Name, sp.Scene.Name, finalDestination.RegionName, reason); 770 sp.Name, sp.Scene.Name, finalDestination.RegionName, reason);
771 771
772 return; 772 return;
@@ -1510,7 +1510,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1510 1510
1511 // Check to see if we have access to the target region. 1511 // Check to see if we have access to the target region.
1512 if (neighbourRegion != null 1512 if (neighbourRegion != null
1513 && !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, newpos, out version, out failureReason)) 1513 && !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, false, newpos, out version, out failureReason))
1514 { 1514 {
1515 // remember banned 1515 // remember banned
1516 m_bannedRegionCache.Add(neighbourRegion.RegionHandle, agentID); 1516 m_bannedRegionCache.Add(neighbourRegion.RegionHandle, agentID);
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
index 71570da..5e831cc 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
@@ -311,9 +311,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
311 SceneObjectGroup sog = base.RezObject(remoteClient, itemID, RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection, 311 SceneObjectGroup sog = base.RezObject(remoteClient, itemID, RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection,
312 RezSelected, RemoveItem, fromTaskID, attachment); 312 RezSelected, RemoveItem, fromTaskID, attachment);
313 313
314 if (sog == null)
315 remoteClient.SendAgentAlertMessage("Unable to rez: problem accessing inventory or locating assets", false);
316
317 return sog; 314 return sog;
318 315
319 } 316 }
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 6e48fcc..c4a42bc 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -797,12 +797,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
797 m_log.WarnFormat( 797 m_log.WarnFormat(
798 "[InventoryAccessModule]: Could not find asset {0} for item {1} {2} for {3} in RezObject()", 798 "[InventoryAccessModule]: Could not find asset {0} for item {1} {2} for {3} in RezObject()",
799 assetID, item.Name, item.ID, remoteClient.Name); 799 assetID, item.Name, item.ID, remoteClient.Name);
800 remoteClient.SendAgentAlertMessage(string.Format("Unable to rez: could not find asset {0} for item {1}.", assetID, item.Name), false);
800 } 801 }
801 else 802 else
802 { 803 {
803 m_log.WarnFormat( 804 m_log.WarnFormat(
804 "[INVENTORY ACCESS MODULE]: Could not find asset {0} for {1} in RezObject()", 805 "[INVENTORY ACCESS MODULE]: Could not find asset {0} for {1} in RezObject()",
805 assetID, remoteClient.Name); 806 assetID, remoteClient.Name);
807 remoteClient.SendAgentAlertMessage(string.Format("Unable to rez: could not find asset {0}.", assetID), false);
806 } 808 }
807 809
808 return null; 810 return null;
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/AuthorizationService.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/AuthorizationService.cs
index 4470799..93dff1f 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/AuthorizationService.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/AuthorizationService.cs
@@ -89,35 +89,43 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
89 public bool IsAuthorizedForRegion( 89 public bool IsAuthorizedForRegion(
90 string user, string firstName, string lastName, string regionID, out string message) 90 string user, string firstName, string lastName, string regionID, out string message)
91 { 91 {
92 message = "authorized";
93
94 // This should not happen 92 // This should not happen
95 if (m_Scene.RegionInfo.RegionID.ToString() != regionID) 93 if (m_Scene.RegionInfo.RegionID.ToString() != regionID)
96 { 94 {
97 m_log.WarnFormat("[AuthorizationService]: Service for region {0} received request to authorize for region {1}", 95 m_log.WarnFormat("[AuthorizationService]: Service for region {0} received request to authorize for region {1}",
98 m_Scene.RegionInfo.RegionID, regionID); 96 m_Scene.RegionInfo.RegionID, regionID);
99 return true; 97 message = string.Format("Region {0} received request to authorize for region {1}", m_Scene.RegionInfo.RegionID, regionID);
98 return false;
100 } 99 }
101 100
102 if (m_accessValue == AccessFlags.None) 101 if (m_accessValue == AccessFlags.None)
102 {
103 message = "Authorized";
103 return true; 104 return true;
105 }
104 106
105 UUID userID = new UUID(user); 107 UUID userID = new UUID(user);
106 bool authorized = true; 108
107 if ((m_accessValue & AccessFlags.DisallowForeigners) == AccessFlags.DisallowForeigners) 109 if ((m_accessValue & AccessFlags.DisallowForeigners) != 0)
108 { 110 {
109 authorized = m_UserManagement.IsLocalGridUser(userID); 111 if (!m_UserManagement.IsLocalGridUser(userID))
110 if (!authorized) 112 {
111 message = "no foreigner users allowed in this region"; 113 message = "No foreign users allowed in this region";
114 return false;
115 }
112 } 116 }
113 if (authorized && (m_accessValue & AccessFlags.DisallowResidents) == AccessFlags.DisallowResidents) 117
118 if ((m_accessValue & AccessFlags.DisallowResidents) != 0)
114 { 119 {
115 authorized = m_Scene.Permissions.IsGod(userID) | m_Scene.Permissions.IsAdministrator(userID); 120 if (!(m_Scene.Permissions.IsGod(userID) || m_Scene.Permissions.IsAdministrator(userID)))
116 if (!authorized) 121 {
117 message = "only Admins and Managers allowed in this region"; 122 message = "Only Admins and Managers allowed in this region";
123 return false;
124 }
118 } 125 }
119 126
120 return authorized; 127 message = "Authorized";
128 return true;
121 } 129 }
122 130
123 } 131 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 3348b42..926ef05 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -264,7 +264,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
264 return true; 264 return true;
265 } 265 }
266 266
267 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, Vector3 position, out string version, out string reason) 267 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string version, out string reason)
268 { 268 {
269 reason = "Communications failure"; 269 reason = "Communications failure";
270 version = ServiceVersion; 270 version = ServiceVersion;
@@ -277,7 +277,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
277// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", 277// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate",
278// s.RegionInfo.RegionName, destination.RegionHandle); 278// s.RegionInfo.RegionName, destination.RegionHandle);
279 279
280 return m_scenes[destination.RegionID].QueryAccess(agentID, agentHomeURI, position, out reason); 280 return m_scenes[destination.RegionID].QueryAccess(agentID, agentHomeURI, viaTeleport, position, out reason);
281 } 281 }
282 282
283 //m_log.Debug("[LOCAL COMMS]: region not found for QueryAccess"); 283 //m_log.Debug("[LOCAL COMMS]: region not found for QueryAccess");
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index 8436488..0444e49 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -207,7 +207,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
207 return m_remoteConnector.UpdateAgent(destination, cAgentData); 207 return m_remoteConnector.UpdateAgent(destination, cAgentData);
208 } 208 }
209 209
210 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, Vector3 position, out string version, out string reason) 210 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string version, out string reason)
211 { 211 {
212 reason = "Communications failure"; 212 reason = "Communications failure";
213 version = "Unknown"; 213 version = "Unknown";
@@ -216,12 +216,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
216 return false; 216 return false;
217 217
218 // Try local first 218 // Try local first
219 if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, position, out version, out reason)) 219 if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, out version, out reason))
220 return true; 220 return true;
221 221
222 // else do the remote thing 222 // else do the remote thing
223 if (!m_localBackend.IsLocalRegion(destination.RegionID)) 223 if (!m_localBackend.IsLocalRegion(destination.RegionID))
224 return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, position, out version, out reason); 224 return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, out version, out reason);
225 225
226 return false; 226 return false;
227 } 227 }
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
index c35f6b7..1437b1b 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
@@ -143,28 +143,32 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
143 } 143 }
144 144
145 145
146 //m_log.DebugFormat("MAP NAME=({0})", mapName); 146 List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20);
147 147
148 // Hack to get around the fact that ll V3 now drops the port from the
149 // map name. See https://jira.secondlife.com/browse/VWR-28570
150 //
151 // Caller, use this magic form instead:
152 // secondlife://http|!!mygrid.com|8002|Region+Name/128/128
153 // or url encode if possible.
154 // the hacks we do with this viewer...
155 //
156 string mapNameOrig = mapName; 148 string mapNameOrig = mapName;
157 if (mapName.Contains("|")) 149 if (regionInfos.Count == 0)
158 mapName = mapName.Replace('|', ':'); 150 {
159 if (mapName.Contains("+")) 151 // Hack to get around the fact that ll V3 now drops the port from the
160 mapName = mapName.Replace('+', ' '); 152 // map name. See https://jira.secondlife.com/browse/VWR-28570
161 if (mapName.Contains("!")) 153 //
162 mapName = mapName.Replace('!', '/'); 154 // Caller, use this magic form instead:
155 // secondlife://http|!!mygrid.com|8002|Region+Name/128/128
156 // or url encode if possible.
157 // the hacks we do with this viewer...
158 //
159 if (mapName.Contains("|"))
160 mapName = mapName.Replace('|', ':');
161 if (mapName.Contains("+"))
162 mapName = mapName.Replace('+', ' ');
163 if (mapName.Contains("!"))
164 mapName = mapName.Replace('!', '/');
165
166 if (mapName != mapNameOrig)
167 regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20);
168 }
163 169
164 // try to fetch from GridServer
165 List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20);
166
167 m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions. Flags={2}", mapName, regionInfos.Count, flags); 170 m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions. Flags={2}", mapName, regionInfos.Count, flags);
171
168 if (regionInfos.Count > 0) 172 if (regionInfos.Count > 0)
169 { 173 {
170 foreach (GridRegion info in regionInfos) 174 foreach (GridRegion info in regionInfos)
@@ -178,7 +182,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
178 data.MapImageId = info.TerrainImage; 182 data.MapImageId = info.TerrainImage;
179 // ugh! V2-3 is very sensitive about the result being 183 // ugh! V2-3 is very sensitive about the result being
180 // exactly the same as the requested name 184 // exactly the same as the requested name
181 if (regionInfos.Count == 1 && mapNameOrig.Contains("|") || mapNameOrig.Contains("+")) 185 if (regionInfos.Count == 1 && (mapName != mapNameOrig))
182 data.Name = mapNameOrig; 186 data.Name = mapNameOrig;
183 else 187 else
184 data.Name = info.RegionName; 188 data.Name = info.RegionName;