aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs39
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs5
3 files changed, 22 insertions, 26 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index 1937637..9f49da9 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -125,10 +125,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
125 { 125 {
126 if (m_scenes.Count > 0) 126 if (m_scenes.Count > 0)
127 { 127 {
128 CachedUserInfo userInfo = GetUserInfo(firstName, lastName); 128 CachedUserInfo userInfo = GetUserInfo(firstName, lastName, pass);
129 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(pass) + ":" + userInfo.UserProfile.PasswordSalt);
130 if (userInfo.UserProfile.PasswordHash != md5PasswdHash)
131 return false;
132 129
133 if (userInfo != null) 130 if (userInfo != null)
134 { 131 {
@@ -153,11 +150,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
153 { 150 {
154 if (m_scenes.Count > 0) 151 if (m_scenes.Count > 0)
155 { 152 {
156 CachedUserInfo userInfo = GetUserInfo(firstName, lastName); 153 CachedUserInfo userInfo = GetUserInfo(firstName, lastName, pass);
157 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(pass) + ":" + userInfo.UserProfile.PasswordSalt);
158 if (userInfo.UserProfile.PasswordHash != md5PasswdHash)
159 return false;
160
161 154
162 if (userInfo != null) 155 if (userInfo != null)
163 { 156 {
@@ -182,11 +175,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
182 { 175 {
183 if (m_scenes.Count > 0) 176 if (m_scenes.Count > 0)
184 { 177 {
185 CachedUserInfo userInfo = GetUserInfo(firstName, lastName); 178 CachedUserInfo userInfo = GetUserInfo(firstName, lastName, pass);
186 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(pass) + ":" + userInfo.UserProfile.PasswordSalt);
187 if (userInfo.UserProfile.PasswordHash != md5PasswdHash)
188 return false;
189
190 179
191 if (userInfo != null) 180 if (userInfo != null)
192 { 181 {
@@ -214,11 +203,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
214 { 203 {
215 if (m_scenes.Count > 0) 204 if (m_scenes.Count > 0)
216 { 205 {
217 CachedUserInfo userInfo = GetUserInfo(firstName, lastName); 206 CachedUserInfo userInfo = GetUserInfo(firstName, lastName, pass);
218 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(pass) + ":" + userInfo.UserProfile.PasswordSalt);
219 if (userInfo.UserProfile.PasswordHash != md5PasswdHash)
220 return false;
221
222 207
223 if (userInfo != null) 208 if (userInfo != null)
224 { 209 {
@@ -251,7 +236,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
251 if (cmdparams.Length < 6) 236 if (cmdparams.Length < 6)
252 { 237 {
253 m_log.Error( 238 m_log.Error(
254 "[INVENTORY ARCHIVER]: usage is load iar <first name> <last name> <inventory path> <password> [<load file path>]"); 239 "[INVENTORY ARCHIVER]: usage is load iar <first name> <last name> <inventory path> <user password> [<load file path>]");
255 return; 240 return;
256 } 241 }
257 242
@@ -282,7 +267,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
282 if (cmdparams.Length < 5) 267 if (cmdparams.Length < 5)
283 { 268 {
284 m_log.Error( 269 m_log.Error(
285 "[INVENTORY ARCHIVER]: usage is save iar <first name> <last name> <inventory path> <password> [<save file path>]"); 270 "[INVENTORY ARCHIVER]: usage is save iar <first name> <last name> <inventory path> <user password> [<save file path>]");
286 return; 271 return;
287 } 272 }
288 273
@@ -334,8 +319,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
334 /// </summary> 319 /// </summary>
335 /// <param name="firstName"></param> 320 /// <param name="firstName"></param>
336 /// <param name="lastName"></param> 321 /// <param name="lastName"></param>
322 /// <param name="pass">User password</param>
337 /// <returns></returns> 323 /// <returns></returns>
338 protected CachedUserInfo GetUserInfo(string firstName, string lastName) 324 protected CachedUserInfo GetUserInfo(string firstName, string lastName, string pass)
339 { 325 {
340 CachedUserInfo userInfo = m_aScene.CommsManager.UserProfileCacheService.GetUserDetails(firstName, lastName); 326 CachedUserInfo userInfo = m_aScene.CommsManager.UserProfileCacheService.GetUserDetails(firstName, lastName);
341 if (null == userInfo) 327 if (null == userInfo)
@@ -345,6 +331,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
345 firstName, lastName); 331 firstName, lastName);
346 return null; 332 return null;
347 } 333 }
334
335 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(pass) + ":" + userInfo.UserProfile.PasswordSalt);
336 if (userInfo.UserProfile.PasswordHash != md5PasswdHash)
337 {
338 m_log.ErrorFormat(
339 "[INVENTORY ARCHIVER]: Password for user {0} {1} incorrect. Please try again.",
340 firstName, lastName);
341 return null;
342 }
348 343
349 return userInfo; 344 return userInfo;
350 } 345 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
index c52c257..e69613a 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
@@ -132,9 +132,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
132 132
133 } 133 }
134 134
135 public bool IsAuthorizedForRegion(string userID, string regionID) 135 public bool IsAuthorizedForRegion(string userID, string regionID, out string message)
136 { 136 {
137 return m_AuthorizationService.IsAuthorizedForRegion(userID, regionID); 137 return m_AuthorizationService.IsAuthorizedForRegion(userID, regionID, out message);
138 } 138 }
139 139
140 } 140 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
index 9241851..a672f4f 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
@@ -117,11 +117,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
117 117
118 } 118 }
119 119
120 public bool IsAuthorizedForRegion(string userID, string regionID) 120 public bool IsAuthorizedForRegion(string userID, string regionID, out string message)
121 { 121 {
122 m_log.InfoFormat("[REMOTE AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} for region {1}", userID, regionID); 122 m_log.InfoFormat("[REMOTE AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} for region {1}", userID, regionID);
123 123
124 bool isAuthorized = true; 124 bool isAuthorized = true;
125 message = String.Empty;
125 126
126 // get the scene this call is being made for 127 // get the scene this call is being made for
127 Scene scene = null; 128 Scene scene = null;
@@ -140,7 +141,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
140 { 141 {
141 UserProfileData profile = scene.CommsManager.UserService.GetUserProfile(new UUID(userID)); 142 UserProfileData profile = scene.CommsManager.UserService.GetUserProfile(new UUID(userID));
142 isAuthorized = IsAuthorizedForRegion(userID, profile.FirstName, profile.SurName, 143 isAuthorized = IsAuthorizedForRegion(userID, profile.FirstName, profile.SurName,
143 profile.Email, scene.RegionInfo.RegionName, regionID); 144 profile.Email, scene.RegionInfo.RegionName, regionID, out message);
144 } 145 }
145 else 146 else
146 { 147 {