aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
diff options
context:
space:
mode:
authorJohan Berntsson2008-07-23 06:59:02 +0000
committerJohan Berntsson2008-07-23 06:59:02 +0000
commit344c9caeb671f3d9dab80f05d18a7dc9f3075bc1 (patch)
tree2c4d9fdd3d63384f009307f63eb6e0646e054593 /OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
parentEnable LSL <-> C# source location mapping when reporing compiler errors to th... (diff)
downloadopensim-SC_OLD-344c9caeb671f3d9dab80f05d18a7dc9f3075bc1.zip
opensim-SC_OLD-344c9caeb671f3d9dab80f05d18a7dc9f3075bc1.tar.gz
opensim-SC_OLD-344c9caeb671f3d9dab80f05d18a7dc9f3075bc1.tar.bz2
opensim-SC_OLD-344c9caeb671f3d9dab80f05d18a7dc9f3075bc1.tar.xz
thanks lulurun for a security patch that blocks unathorized access to the inventory server (see http://opensimulator.org/wiki/Security_vulnerability_brought_by_non-check_inventory_service)
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs')
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs29
1 files changed, 28 insertions, 1 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 0040718..e22dff6 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -63,6 +63,33 @@ namespace OpenSim.Framework.Communications.Cache
63 /// A new user has moved into a region in this instance so retrieve their profile from the user service. 63 /// A new user has moved into a region in this instance so retrieve their profile from the user service.
64 /// </summary> 64 /// </summary>
65 /// <param name="userID"></param> 65 /// <param name="userID"></param>
66 public void AddNewUser(IClientAPI remoteClient)
67 {
68 // Potential fix - Multithreading issue.
69 lock (m_userProfiles)
70 {
71 if (!m_userProfiles.ContainsKey(remoteClient.AgentId))
72 {
73 UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(remoteClient.AgentId);
74 CachedUserInfo userInfo = new CachedUserInfo(m_commsManager, userProfile, remoteClient);
75
76 if (userInfo.UserProfile != null)
77 {
78 // The inventory for the user will be populated when they actually enter the scene
79 m_userProfiles.Add(remoteClient.AgentId, userInfo);
80 }
81 else
82 {
83 m_log.ErrorFormat("[USER CACHE]: User profile for user {0} not found.", remoteClient.AgentId);
84 }
85 }
86 }
87 }
88
89 /// <summary>
90 /// A new user has moved into a region in this instance so retrieve their profile from the user service.
91 /// </summary>
92 /// <param name="userID"></param>
66 public void AddNewUser(LLUUID userID) 93 public void AddNewUser(LLUUID userID)
67 { 94 {
68 // Potential fix - Multithreading issue. 95 // Potential fix - Multithreading issue.
@@ -119,7 +146,7 @@ namespace OpenSim.Framework.Communications.Cache
119 CachedUserInfo userInfo = GetUserDetails(userID); 146 CachedUserInfo userInfo = GetUserDetails(userID);
120 if (userInfo != null) 147 if (userInfo != null)
121 { 148 {
122 m_commsManager.InventoryService.RequestInventoryForUser(userID, userInfo.InventoryReceive); 149 m_commsManager.SecureInventoryService.RequestInventoryForUser(userID, userInfo.SessionID, userInfo.InventoryReceive);
123 //IInventoryServices invService = userInfo.GetInventoryService(); 150 //IInventoryServices invService = userInfo.GetInventoryService();
124 //if (invService != null) 151 //if (invService != null)
125 //{ 152 //{