aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Friends/FriendsService.cs
diff options
context:
space:
mode:
authorDiva Canto2011-05-22 16:51:03 -0700
committerDiva Canto2011-05-22 16:51:03 -0700
commit336665e03532cf9d7a1ad65d5071e7050bf6ecd0 (patch)
tree45c7c1145de1b5af3ff198bcb29564a2547e4575 /OpenSim/Services/Friends/FriendsService.cs
parentFile to be removed (diff)
downloadopensim-SC_OLD-336665e03532cf9d7a1ad65d5071e7050bf6ecd0.zip
opensim-SC_OLD-336665e03532cf9d7a1ad65d5071e7050bf6ecd0.tar.gz
opensim-SC_OLD-336665e03532cf9d7a1ad65d5071e7050bf6ecd0.tar.bz2
opensim-SC_OLD-336665e03532cf9d7a1ad65d5071e7050bf6ecd0.tar.xz
More on HG Friends. Added Delete(string, string) across the board. Added security to friendship identifiers so that they can safely be deleted across worlds. Had to change Get(string) to use LIKE because the secret in the identifier is not always known -- affects only HG visitors. BOTTOM LINE SO FAR: HG friendships established and deleted safely across grids, local rights working but not (yet?) being transmitted back.
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Friends/FriendsService.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Services/Friends/FriendsService.cs b/OpenSim/Services/Friends/FriendsService.cs
index 4664cb3..e2033ac 100644
--- a/OpenSim/Services/Friends/FriendsService.cs
+++ b/OpenSim/Services/Friends/FriendsService.cs
@@ -75,7 +75,7 @@ namespace OpenSim.Services.Friends
75 if (!UUID.TryParse(d.PrincipalID, out i.PrincipalID)) 75 if (!UUID.TryParse(d.PrincipalID, out i.PrincipalID))
76 { 76 {
77 string tmp = string.Empty; 77 string tmp = string.Empty;
78 if (!Util.ParseUniversalUserIdentifier(d.PrincipalID, out i.PrincipalID, out tmp, out tmp, out tmp)) 78 if (!Util.ParseUniversalUserIdentifier(d.PrincipalID, out i.PrincipalID, out tmp, out tmp, out tmp, out tmp))
79 // bad record. ignore this entry 79 // bad record. ignore this entry
80 continue; 80 continue;
81 } 81 }
@@ -101,6 +101,11 @@ namespace OpenSim.Services.Friends
101 return m_Database.Store(d); 101 return m_Database.Store(d);
102 } 102 }
103 103
104 public bool Delete(string principalID, string friend)
105 {
106 return m_Database.Delete(principalID, friend);
107 }
108
104 public virtual bool Delete(UUID PrincipalID, string Friend) 109 public virtual bool Delete(UUID PrincipalID, string Friend)
105 { 110 {
106 return m_Database.Delete(PrincipalID, Friend); 111 return m_Database.Delete(PrincipalID, Friend);