diff options
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/IPresenceData.cs | 1 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLPresenceData.cs | 13 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLPresenceData.cs | 14 | ||||
-rw-r--r-- | OpenSim/Data/Null/NullPresenceData.cs | 8 |
4 files changed, 36 insertions, 0 deletions
diff --git a/OpenSim/Data/IPresenceData.cs b/OpenSim/Data/IPresenceData.cs index b871f56..9ec48b0 100644 --- a/OpenSim/Data/IPresenceData.cs +++ b/OpenSim/Data/IPresenceData.cs | |||
@@ -53,5 +53,6 @@ namespace OpenSim.Data | |||
53 | bool ReportAgent(UUID sessionID, UUID regionID); | 53 | bool ReportAgent(UUID sessionID, UUID regionID); |
54 | PresenceData[] Get(string field, string data); | 54 | PresenceData[] Get(string field, string data); |
55 | bool Delete(string field, string val); | 55 | bool Delete(string field, string val); |
56 | bool VerifyAgent(UUID agentId, UUID secureSessionID); | ||
56 | } | 57 | } |
57 | } | 58 | } |
diff --git a/OpenSim/Data/MSSQL/MSSQLPresenceData.cs b/OpenSim/Data/MSSQL/MSSQLPresenceData.cs index e7b3d9c..deff2ed 100644 --- a/OpenSim/Data/MSSQL/MSSQLPresenceData.cs +++ b/OpenSim/Data/MSSQL/MSSQLPresenceData.cs | |||
@@ -100,5 +100,18 @@ namespace OpenSim.Data.MSSQL | |||
100 | return true; | 100 | return true; |
101 | } | 101 | } |
102 | 102 | ||
103 | public bool VerifyAgent(UUID agentId, UUID secureSessionID) | ||
104 | { | ||
105 | PresenceData[] ret = Get("SecureSessionID", | ||
106 | secureSessionID.ToString()); | ||
107 | |||
108 | if (ret.Length == 0) | ||
109 | return false; | ||
110 | |||
111 | if(ret[0].UserID != agentId.ToString()) | ||
112 | return false; | ||
113 | |||
114 | return true; | ||
115 | } | ||
103 | } | 116 | } |
104 | } | 117 | } |
diff --git a/OpenSim/Data/MySQL/MySQLPresenceData.cs b/OpenSim/Data/MySQL/MySQLPresenceData.cs index 7808060..3f90639 100644 --- a/OpenSim/Data/MySQL/MySQLPresenceData.cs +++ b/OpenSim/Data/MySQL/MySQLPresenceData.cs | |||
@@ -95,5 +95,19 @@ namespace OpenSim.Data.MySQL | |||
95 | 95 | ||
96 | return true; | 96 | return true; |
97 | } | 97 | } |
98 | |||
99 | public bool VerifyAgent(UUID agentId, UUID secureSessionID) | ||
100 | { | ||
101 | PresenceData[] ret = Get("SecureSessionID", | ||
102 | secureSessionID.ToString()); | ||
103 | |||
104 | if (ret.Length == 0) | ||
105 | return false; | ||
106 | |||
107 | if(ret[0].UserID != agentId.ToString()) | ||
108 | return false; | ||
109 | |||
110 | return true; | ||
111 | } | ||
98 | } | 112 | } |
99 | } \ No newline at end of file | 113 | } \ No newline at end of file |
diff --git a/OpenSim/Data/Null/NullPresenceData.cs b/OpenSim/Data/Null/NullPresenceData.cs index c06c223..b85b95e 100644 --- a/OpenSim/Data/Null/NullPresenceData.cs +++ b/OpenSim/Data/Null/NullPresenceData.cs | |||
@@ -222,5 +222,13 @@ namespace OpenSim.Data.Null | |||
222 | return true; | 222 | return true; |
223 | } | 223 | } |
224 | 224 | ||
225 | public bool VerifyAgent(UUID agentId, UUID secureSessionID) | ||
226 | { | ||
227 | if (Instance != this) | ||
228 | return Instance.VerifyAgent(agentId, secureSessionID); | ||
229 | |||
230 | return false; | ||
231 | } | ||
232 | |||
225 | } | 233 | } |
226 | } | 234 | } |