You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
V9: Fix for migration of non-default configurated users/members (#11684)
* #11366
Fallback to try login using super legacy HMACSHA1 even when the algorithm is stated as being HMACSHA256. The issue is that v8 saves HMACSHA256 on the user, but when configured to use legacy encoding it actually uses HMACSHA1
* Support migration of members with:
UseLegacyEncoding+Clear
UseLegacyEncoding+Encrypted (Requires machine key)
UseLegacyEncoding+Hashed
* Fixes unit tests
* Avoid exceptions + unit tests
* Save unknown algorithm if we dont know it, instead of persisting a wrong algorithm.
* Added setting to enable clear text password rehashes.
* Removed support for migration of clear text passwords
* Fixed unit test
thrownewInvalidOperationException("unable to determine member password hashing algorith");
104
+
if(isPasswordAlgorithmKnown)
105
+
{
106
+
_logger.LogError("Unable to determine member password hashing algorithm");
107
+
}
108
+
else
109
+
{
110
+
_logger.LogDebug("Unable to determine member password hashing algorithm, but this can happen when member enters a wrong password, before it has be rehashed");
111
+
}
112
+
113
+
returnPasswordVerificationResult.Failed;
70
114
}
71
115
72
116
varisValid=LegacyPasswordSecurity.VerifyPassword(
@@ -76,5 +120,65 @@ public override PasswordVerificationResult VerifyHashedPassword(MemberIdentityUs
//We need to special handle this case, apparently v8 still saves the user algorithm as {"hashAlgorithm":"HMACSHA256"}, when using legacy encoding and hasinging.
0 commit comments