Ensuring Proper Password Format
-6
If you're asking your users to submit a password of 6-12 characters, you want to make sure it is done properly and without any special characters which could compromise your system.
To do this, you would want to use regular expressions
To do this, you would want to use regular expressions
NewPass = request("newpass")
Dim RegEx
Set RegEx = New regexp
RegEx.Pattern = "^[A-Za-z0-9]{6,12}$"
RegEx.Global = True
RegEx.IgnoreCase = True
if RegEx.Test(NewPass) = FALSE then response.redirect("error.asp")
Set RegEx = NOTHING






There are currently no comments for this snippet.