diff options
Diffstat (limited to 'OpenSim/Grid/UserServer/UserManager.cs')
-rw-r--r-- | OpenSim/Grid/UserServer/UserManager.cs | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index 43239a0..be9e6f1 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs | |||
@@ -156,8 +156,22 @@ namespace OpenSim.Grid.UserServer | |||
156 | UserProfileData userProfile; | 156 | UserProfileData userProfile; |
157 | if (requestData.Contains("avatar_name")) | 157 | if (requestData.Contains("avatar_name")) |
158 | { | 158 | { |
159 | userProfile = GetUserProfile((string) requestData["avatar_name"]); | 159 | string query = (string)requestData["avatar_name"]; |
160 | if (userProfile == null) | 160 | |
161 | System.Text.RegularExpressions.Regex objAlphaNumericPattern = new System.Text.RegularExpressions.Regex("[^a-zA-Z0-9]"); | ||
162 | |||
163 | string[] querysplit; | ||
164 | querysplit = query.Split(' '); | ||
165 | |||
166 | if (querysplit.Length == 2) | ||
167 | { | ||
168 | userProfile = GetUserProfile(querysplit[0],querysplit[1]); | ||
169 | if (userProfile == null) | ||
170 | { | ||
171 | return CreateUnknownUserErrorResponse(); | ||
172 | } | ||
173 | } | ||
174 | else | ||
161 | { | 175 | { |
162 | return CreateUnknownUserErrorResponse(); | 176 | return CreateUnknownUserErrorResponse(); |
163 | } | 177 | } |
@@ -179,7 +193,18 @@ namespace OpenSim.Grid.UserServer | |||
179 | //CFK: Console.WriteLine("METHOD BY UUID CALLED"); | 193 | //CFK: Console.WriteLine("METHOD BY UUID CALLED"); |
180 | if (requestData.Contains("avatar_uuid")) | 194 | if (requestData.Contains("avatar_uuid")) |
181 | { | 195 | { |
182 | userProfile = GetUserProfile((LLUUID) (string) requestData["avatar_uuid"]); | 196 | LLUUID guess = new LLUUID(); |
197 | try | ||
198 | { | ||
199 | guess = new LLUUID((string)requestData["avatar_uuid"]); | ||
200 | |||
201 | userProfile = GetUserProfile(guess); | ||
202 | } | ||
203 | catch (System.FormatException) | ||
204 | { | ||
205 | return CreateUnknownUserErrorResponse(); | ||
206 | } | ||
207 | |||
183 | if (userProfile == null) | 208 | if (userProfile == null) |
184 | { | 209 | { |
185 | return CreateUnknownUserErrorResponse(); | 210 | return CreateUnknownUserErrorResponse(); |