use of passwordStrengthRegularExpression

sharepoint2010
codeplex

#1

The settings for my membership provider related to password strength are:

passwordStrengthRegularExpression="(?=.{10,})(?=(.*\d){2,})"  and  minRequiredNonalphanumericCharacters="0"

It seems, though, that when a password is generated from the MembershipRequest web part, it ignores the passwordStrengthRegularExpression and only looks at the minimum required password length and the minimum required non-alphanumeric characters.

Since my password requirements require at least 2 digits, invalid passwords are being generated.

My desire is to allow the user to specify his/her own starting password. Should I attempt to modify my copy of your code to do this? or have you already built in an option I can set to display the password and password confirmation lines on the Membership Request web part?

 


#2

We use Membership's built in GeneratePassword function, and unfortunately all it takes into account is the length and minimumnonalphanumericcharacters.  That makes sense, because although it is easy to validate a password using a regular expression, generating unique passwords that validate to custom regular expression's would be pretty tough.

If you require at least 2 digits you'll need a code change (or change your password requirements - minimum 2 non alpha numeric characters will be more secure minimum than 2 digits).

If you'd like the user to enter their own password, you'll have to modify the code - I haven't added that.  If you do end up making changes that you think will be beneficial to everybody, please submit them as a patch and I can include them in a future release.

Thanks,

Chris


#3

I think I'm stuck with using the same password requirements as our corporate domain uses, and, actually, the design of the account creation, password reset, etc. pages I have been given to code is so much different from what you have provided, that think it will be easier for me to start from scratch - which is a real shame since you have done such nice work on this.

If I change my mind and decide to make major modifications to your webparts, I'm sure you'll be hearing from me again here in this forum.

Thanks for your help Chris.

Dan


#4

Glad to help! It's too bad you can't use the FBA Pack, but if you do have very specific requirements you're probably better to start from scratch.  

Thanks,

Chris