PDA

View Full Version : Making a password case sensitive



dmweber
07-16-2007, 03:01 PM
Hi All

1)Encrypted Password script

2) http://www.dynamicdrive.com/dynamicindex9/password.htm

3) My client would like the password to be case sensitive. Is there a way to make this happen? He wants the password to be lower case.

Thank you,
Daisy

djr33
07-16-2007, 03:32 PM
password = document.password1.password2.value.toLowerCase()
username = document.password1.username2.value.toLowerCase()

Find those lines near the top of the script and simply remove the last bit:


password = document.password1.password2.value
username = document.password1.username2.value

jscheuer1
07-16-2007, 03:41 PM
password = document.password1.password2.value.toLowerCase()
username = document.password1.username2.value.toLowerCase()

Find those lines near the top of the script and simply remove the last bit:


password = document.password1.password2.value
username = document.password1.username2.value

That will require a lower case username as well. Leave the username line alone if you want to allow for upper case letters in that field. If you remove toLowerCase(), it will result in that field needing to be entered in all lower case letters to pass. Mixed upper and lower case passwords and usernames that are case sensitive could be possible (I know you didn't ask for that), but the password generator (at least) would need to be changed to allow for that.

Twey
07-16-2007, 03:56 PM
I wrote a superior replacement to this script, which is available here (http://www.twey.co.uk/?q=encpass). Among other things, one of the features it adds is case sensitivity.

djr33
07-16-2007, 04:10 PM
Ah, yes, I forgot to mention that I changed it for the username too. Easy to pick, though, for that.

I didn't think the generator would have trouble.

And, yeah, use Twey's script. It's better.

(This post probabl didn't help you... :p)

dmweber
07-16-2007, 05:17 PM
Thank you all for your replies, they were all helpful.
Daisy