Explorar o código

2005-02-06 Gonzalo Paniagua Javier <[email protected]>

	* FormsAuthentication.cs: fixed typo when getting the hash for the 
	password in SHA1 and MD5. Thanks to Tadas Dailyda.
	Lock on a static object instead of typeof(FormsAuthentication).


svn path=/trunk/mcs/; revision=40212
Gonzalo Paniagua Javier %!s(int64=21) %!d(string=hai) anos
pai
achega
aaa9efd15a

+ 6 - 0
mcs/class/System.Web/System.Web.Security/ChangeLog

@@ -1,3 +1,9 @@
+2005-02-06 Gonzalo Paniagua Javier <[email protected]>
+
+	* FormsAuthentication.cs: fixed typo when getting the hash for the 
+	password in SHA1 and MD5. Thanks to Tadas Dailyda.
+	Lock on a static object instead of typeof(FormsAuthentication).
+
 2005-02-01 Gonzalo Paniagua Javier <[email protected]>
 
 	* FormsAuthenticationModule.cs: allow accessing other files in the

+ 4 - 3
mcs/class/System.Web/System.Web.Security/FormsAuthentication.cs

@@ -47,6 +47,7 @@ namespace System.Web.Security
 		static string cookiePath;
 		static int timeout;
 		static FormsProtectionEnum protection;
+		static object locker = new object ();
 #if NET_1_1
 		static bool requireSSL;
 		static bool slidingExpiration;
@@ -80,10 +81,10 @@ namespace System.Web.Security
 				/* Do nothing */
 				break;
 			case FormsAuthPasswordFormat.MD5:
-				stored = HashPasswordForStoringInConfigFile (stored, "MD5");
+				password = HashPasswordForStoringInConfigFile (password, "MD5");
 				break;
 			case FormsAuthPasswordFormat.SHA1:
-				stored = HashPasswordForStoringInConfigFile (stored, "SHA1");
+				password = HashPasswordForStoringInConfigFile (password, "SHA1");
 				break;
 			}
 
@@ -251,7 +252,7 @@ namespace System.Web.Security
 			if (initialized)
 				return;
 
-			lock (typeof (FormsAuthentication)) {
+			lock (locker) {
 				if (initialized)
 					return;