Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...How to restrict the special characters for passwordHow to restrict the special characters for password
Previous
 
Next
New Post
9/27/2009 10:02 PM
 

Hi,

Is there a way to avoid special characters like "@#$%^: " from the password generation and restrict the password generation to allow numbers and alphabets. I have loooked into web.config's "minRequiredNonalphanumericCharacters" property, which only gives an option either to have it or not. Can setup a pattern to allow only numbers and alphabets?

Thanks,
Ramesh

 
New Post
9/28/2009 8:51 AM
 

Might look at using passwordStrengthRegularExpression.  Also might look at modifying the login control validation rules to not allow non-alphanumeric characters.

Jeff

 
New Post
9/28/2009 9:17 AM
 

Hi Ramesh,

This is actually a harder problem than it would appear; the Membership.GeneratePassword method only allows specification of the *minimum* number of non-alphanumeric characters in a generated password; there is no way to enforce a maximum here.  A generated password also is not guaranteed to meet the regular expression criteria specified in PasswordStrengthRegularExpression.  See the documentation for more details.

Your sole recourse will be to roll-your-own password generation (which I strongly discourage), or implement your own membership provider (by decorating the ASP.NET membership provider) and overriding GeneratePassword.  You must be very careful here to not interfere with the cryptographically-valid entropy used in the underlying generation mechanism; this is a very dangerous area to be playing in.

I've long meant to blog about this and distribute a properly-constructed password generator with a maximum non-alphanumeric threshold that decorates any other membership provider, but my plate has been full of late.  Maybe someday I'll be able to get to it!

Brandon


Brandon Haynes
BrandonHaynes.org
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...How to restrict the special characters for passwordHow to restrict the special characters for password


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out