Results 1 to 6 of 6

Thread: Making a password case sensitive

  1. #1
    Join Date
    Feb 2005
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Making a password case sensitive

    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
    Last edited by jscheuer1; 07-16-2007 at 03:32 PM. Reason: fix link

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,156
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Code:
    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:

    Code:
    password = document.password1.password2.value
    username = document.password1.username2.value
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,475
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by djr33 View Post
    Code:
    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:

    Code:
    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I wrote a superior replacement to this script, which is available here. Among other things, one of the features it adds is case sensitivity.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,156
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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... )
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #6
    Join Date
    Feb 2005
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Making a password case sensitive

    Thank you all for your replies, they were all helpful.
    Daisy

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •