473,385 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

PasswordRecovery Control - Control Random Password Characters

I'm trying to create a process that allows me to limit the non-alphanumeric
characters generated with the PasswordRecovery control. Specially I want to
suppress some characters for security reasons. With textboxes I'm doing this
with a RegularExpressionValidator control and have the following the
following attribute setup:
ValidationExpression="^[a-zA-Z0-9\.\-_@#$%^&+=]{6,100}"

This limits the user input to alphanumeric characters as well of some
selected characters. The problem is when I use the built-in PasswordRecovery
control, I can't find a way to limit the random characters, some of which
cause a validation error within the RegularExpressionValidator control. For
example, the following was created by the PasswordRecovery control for a new
password:
UFa]d+T|!&D9eE

Some of the characters violate my regular expression. So I tried two other
approaches which also have failed. One was to simplify my regular expression
to just check that a minimum and maximum number of characters were passed,
such as:
ValidationExpression="^[\w]{6,100}"

So "UFa]d+T|!&D9eE" should pass this test, but unfortunately it doesn't
because of the bracket ("]") confuses the regex processing.

The other path I explored was creating my own Password Recovery user control
and started coding with MembershipUser.ResetPassword and related functions.
Unfortunately I couldn't find away to reset the user password without having
the current password. Since I'm using the hash method to store the password,
I can't obtain the password via code. Since the user forgot the password, I
can't ask the user for it on the form. It seems like catch-22!

My two questions:
1. Using the PasswordRecovery Control, can I limit the characters that are
randomly generated when the user control is created? Even just limiting to
alphanumeric would be good.
2. Creating my own control, how do I reset the password without knowing the
original password, while using the hash method to store passwords?
Dec 31 '06 #1
0 2008

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Amelyan | last post by:
Can anyone provide a simple example of using ASP.NET 2.0 PasswordRecovery control? All I need to accomplish is to e-mail user password using provided username in PasswordRecovery control. ...
0
by: paulmac106 | last post by:
Hi, I'm having 2 problems with this control. I save the password in the db as clear text, when a user uses the PasswordRecovery tool the value is then encrypted and sent to the user...
1
by: ned.kraushaar | last post by:
Currently, the email that gets sent to a user with a new password is very cryptic: Please return to the site and log in using the following information. User Name: nedkraushaar Password:...
0
by: =?Utf-8?B?V0I=?= | last post by:
Hi, Does anyone know how to programmatically get the new password from the PasswordRecovery control? I'm modifying the SendingMail event of my PasswordRecovery control so that I can customize...
0
by: =?Utf-8?B?UmFq?= | last post by:
In PasswordRecovery control, in case if the mail server is not accessable, how can we notify the user it before resetting the password. I know we have "SendMailError" event, but it fires only after...
3
by: Ben | last post by:
Hi, when a password is sent to the user via email with the PasswordRecovery control, is it sent in "clear" even if the password is hashed or encrypted? Thanks Ben
6
by: =?Utf-8?B?TW9yZ2Fu?= | last post by:
I have a PasswordRecovery web control as part of my login functionality that I have successfully tested in an application I'm building. I was asked to migrate some historical user data into the...
2
by: paul.haines | last post by:
Does anyone know how to change the current mode in the PasswordRecovery control? I have an instance on the "login.aspx" page and, after the user has successfully had their password emailed to...
4
by: =?Utf-8?B?R2hpc3Rvcw==?= | last post by:
Hi, I collect hashed password in my BD. I give the opportunity to the user to reset his password with the PasswordRecovery control. But, when he receive it , it is a series fo strange characters...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.