aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs')
-rw-r--r--OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs17
1 files changed, 6 insertions, 11 deletions
diff --git a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
index 32da44f..f987383 100644
--- a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
@@ -117,7 +117,6 @@ namespace OpenSim.Server.Handlers.UserAccounts
117 } 117 }
118 118
119 return FailureResult(); 119 return FailureResult();
120
121 } 120 }
122 121
123 byte[] GetAccount(Dictionary<string, object> request) 122 byte[] GetAccount(Dictionary<string, object> request)
@@ -126,13 +125,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
126 UUID scopeID = UUID.Zero; 125 UUID scopeID = UUID.Zero;
127 Dictionary<string, object> result = new Dictionary<string, object>(); 126 Dictionary<string, object> result = new Dictionary<string, object>();
128 127
129 if (!request.ContainsKey("ScopeID")) 128 if (request.ContainsKey("ScopeID") && !UUID.TryParse(request["ScopeID"].ToString(), out scopeID))
130 {
131 result["result"] = "null";
132 return ResultToBytes(result);
133 }
134
135 if (!UUID.TryParse(request["ScopeID"].ToString(), out scopeID))
136 { 129 {
137 result["result"] = "null"; 130 result["result"] = "null";
138 return ResultToBytes(result); 131 return ResultToBytes(result);
@@ -174,11 +167,11 @@ namespace OpenSim.Server.Handlers.UserAccounts
174 167
175 byte[] GetAccounts(Dictionary<string, object> request) 168 byte[] GetAccounts(Dictionary<string, object> request)
176 { 169 {
177 if (!request.ContainsKey("ScopeID") || !request.ContainsKey("query")) 170 if (!request.ContainsKey("query"))
178 return FailureResult(); 171 return FailureResult();
179 172
180 UUID scopeID = UUID.Zero; 173 UUID scopeID = UUID.Zero;
181 if (!UUID.TryParse(request["ScopeID"].ToString(), out scopeID)) 174 if (request.ContainsKey("ScopeID") && !UUID.TryParse(request["ScopeID"].ToString(), out scopeID))
182 return FailureResult(); 175 return FailureResult();
183 176
184 string query = request["query"].ToString(); 177 string query = request["query"].ToString();
@@ -187,7 +180,9 @@ namespace OpenSim.Server.Handlers.UserAccounts
187 180
188 Dictionary<string, object> result = new Dictionary<string, object>(); 181 Dictionary<string, object> result = new Dictionary<string, object>();
189 if ((accounts == null) || ((accounts != null) && (accounts.Count == 0))) 182 if ((accounts == null) || ((accounts != null) && (accounts.Count == 0)))
183 {
190 result["result"] = "null"; 184 result["result"] = "null";
185 }
191 else 186 else
192 { 187 {
193 int i = 0; 188 int i = 0;
@@ -208,7 +203,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
208 byte[] StoreAccount(Dictionary<string, object> request) 203 byte[] StoreAccount(Dictionary<string, object> request)
209 { 204 {
210 UUID principalID = UUID.Zero; 205 UUID principalID = UUID.Zero;
211 if (!(request.ContainsKey("PrincipalID") && UUID.TryParse(request["PrincipalID"].ToString(), out principalID))) 206 if (request.ContainsKey("PrincipalID") && !UUID.TryParse(request["PrincipalID"].ToString(), out principalID))
212 return FailureResult(); 207 return FailureResult();
213 208
214 UUID scopeID = UUID.Zero; 209 UUID scopeID = UUID.Zero;