aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-09-16 19:45:42 +0100
committerJustin Clark-Casey (justincc)2013-09-20 21:39:01 +0100
commit86c39d618e370953fba16ec4ad75c763bd8d470c (patch)
treea849832d17ebdcebe941a7633031663fd43b138c /OpenSim/Region
parentminor: replace spaces with tabs for see_into_region setting (diff)
downloadopensim-SC_OLD-86c39d618e370953fba16ec4ad75c763bd8d470c.zip
opensim-SC_OLD-86c39d618e370953fba16ec4ad75c763bd8d470c.tar.gz
opensim-SC_OLD-86c39d618e370953fba16ec4ad75c763bd8d470c.tar.bz2
opensim-SC_OLD-86c39d618e370953fba16ec4ad75c763bd8d470c.tar.xz
To avoid viewers (particularly on the Hypergrid) from permanently caching a UUID -> "Unknown User" binding, drop the binding request rather than replying with "Unknown User"
By not binding UUID -> "Unknown User", we leave open the possibility that the binding may be correctly resolved at a later time, which can still happen in some Hypergrid situations. Observed behaviour of LL viewer 3.3.4 is that a dropped bind request is not retried until the next session.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs77
1 files changed, 42 insertions, 35 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
index 8c983e6..25e8d69 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
@@ -178,17 +178,20 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
178 m_ServiceThrottle.Enqueue("name", uuid.ToString(), delegate 178 m_ServiceThrottle.Enqueue("name", uuid.ToString(), delegate
179 { 179 {
180 //m_log.DebugFormat("[YYY]: Name request {0}", uuid); 180 //m_log.DebugFormat("[YYY]: Name request {0}", uuid);
181 bool foundRealName = TryGetUserNames(uuid, names);
182
183 if (names.Length == 2)
184 {
185 if (!foundRealName)
186 m_log.DebugFormat("[USER MANAGEMENT MODULE]: Sending {0} {1} for {2} to {3} since no bound name found", names[0], names[1], uuid, client.Name);
187 181
182 // As least upto September 2013, clients permanently cache UUID -> Name bindings. Some clients
183 // appear to clear this when the user asks it to clear the cache, but others may not.
184 //
185 // So to avoid clients
186 // (particularly Hypergrid clients) permanently binding "Unknown User" to a given UUID, we will
187 // instead drop the request entirely.
188 if (TryGetUserNames(uuid, names))
188 client.SendNameReply(uuid, names[0], names[1]); 189 client.SendNameReply(uuid, names[0], names[1]);
189 } 190// else
191// m_log.DebugFormat(
192// "[USER MANAGEMENT MODULE]: No bound name for {0} found, ignoring request from {1}",
193// uuid, client.Name);
190 }); 194 });
191
192 } 195 }
193 } 196 }
194 197
@@ -391,7 +394,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
391 } 394 }
392 395
393 names[0] = "Unknown"; 396 names[0] = "Unknown";
394 names[1] = "UserUMMTGUN8"; 397 names[1] = "UserUMMTGUN9";
395 398
396 return false; 399 return false;
397 } 400 }
@@ -539,7 +542,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
539 AddUser(uuid, homeURL + ";" + first + " " + last); 542 AddUser(uuid, homeURL + ";" + first + " " + last);
540 } 543 }
541 544
542 public void AddUser (UUID id, string creatorData) 545 public void AddUser(UUID id, string creatorData)
543 { 546 {
544 //m_log.DebugFormat("[USER MANAGEMENT MODULE]: Adding user with id {0}, creatorData {1}", id, creatorData); 547 //m_log.DebugFormat("[USER MANAGEMENT MODULE]: Adding user with id {0}, creatorData {1}", id, creatorData);
545 548
@@ -549,24 +552,24 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
549 552
550 if (oldUser != null) 553 if (oldUser != null)
551 { 554 {
552 if (creatorData == null || creatorData == String.Empty) 555// if (creatorData == null || creatorData == String.Empty)
553 { 556// {
554 //ignore updates without creator data 557// //ignore updates without creator data
555 return; 558// return;
556 } 559// }
557 560//
558 //try update unknown users, but don't update anyone else 561// //try update unknown users, but don't update anyone else
559 if (oldUser.FirstName == "Unknown" && !creatorData.Contains("Unknown")) 562// if (oldUser.FirstName == "Unknown" && !creatorData.Contains("Unknown"))
560 { 563// {
561 lock (m_UserCache) 564// lock (m_UserCache)
562 m_UserCache.Remove(id); 565// m_UserCache.Remove(id);
563 m_log.DebugFormat("[USER MANAGEMENT MODULE]: Re-adding user with id {0}, creatorData [{1}] and old HomeURL {2}", id, creatorData, oldUser.HomeURL); 566// m_log.DebugFormat("[USER MANAGEMENT MODULE]: Re-adding user with id {0}, creatorData [{1}] and old HomeURL {2}", id, creatorData, oldUser.HomeURL);
564 } 567// }
565 else 568// else
566 { 569// {
567 //we have already a valid user within the cache 570 //we have already a valid user within the cache
568 return; 571 return;
569 } 572// }
570 } 573 }
571 574
572 UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, id); 575 UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, id);
@@ -602,15 +605,19 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
602 if (parts.Length >= 2) 605 if (parts.Length >= 2)
603 user.FirstName = parts[1].Replace(' ', '.'); 606 user.FirstName = parts[1].Replace(' ', '.');
604 } 607 }
605 else 608
606 { 609 // To avoid issues with clients, particularly Hypergrid ones, permanently caching
607 // Temporarily add unknown user entries of this type into the cache so that we can distinguish 610 // UUID -> "Unknown User" name bindings, elsewhere we will drop such requests rather than replying.
608 // this source from other recent (hopefully resolved) bugs that fail to retrieve a user name binding 611 // This also means that we cannot add an unknown user binding to the cache here.
609 // TODO: Can be removed when GUN* unknown users have definitely dropped significantly or 612// else
610 // disappeared. 613// {
611 user.FirstName = "Unknown"; 614// // Temporarily add unknown user entries of this type into the cache so that we can distinguish
612 user.LastName = "UserUMMAU4"; 615// // this source from other recent (hopefully resolved) bugs that fail to retrieve a user name binding
613 } 616// // TODO: Can be removed when GUN* unknown users have definitely dropped significantly or
617// // disappeared.
618// user.FirstName = "Unknown";
619// user.LastName = "UserUMMAU4";
620// }
614 621
615 AddUserInternal(user); 622 AddUserInternal(user);
616 } 623 }