Results 1 to 6 of 6

Thread: Encrypted Password script

  1. #1
    Join Date
    Jun 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Encrypted Password script

    Hello Script Masters,

    I need help regarding how to set up a password protected page. I have tried to follow the direction I found HERE
    But it didnt work!... Well, my problem is that when type in the user name and password. the page I want to load after the user name /password has been submitted is not loading, instead I just get an error page. any help would really be great...

    Thnak you,
    Minnie

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

    Default

    Important: In general JavaScript password scripts are significantly less secure that their CGI counterpart. If your server supports CGI, the ideal method of password protection is via that route.
    From that page.

    Anyway, not really sure why it's not working, but note that javascript is very insecure and a joke to those who would be trying to get around it. It'll annoy your "good" users and not stop the "bad" users.

    Someone can probably tell you what's wrong with the script though; could you link to your page?
    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
    May 2006
    Posts
    259
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    Hello...

    That's a pretty cool little script...

    The password has got to be the same as your .html file.

    In short, if your password is, "hello" your html file must also be hello.html

    So you place that script on any page you want but the page they will access must be the same as the password.

    Oh yea, make sure the script has HTML and not HTM because it's obviously not going to work since it's not going to find .HTM if your using HTML.

    Hope that helped!
    "Only dead fish flow with the stream".
    - Unknown

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

    Default

    Code:
    window.location=password+".htm"}
    Looks like it is .htm, not html.


    Hmm.... weird script... guess it makes sense.

    If I were doing it, I'd rather have the username be the name of the next page... the password feels like it should be more secure than that. (Though there's no real reason for this... just superficially)
    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

  5. #5
    Join Date
    Jun 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by djr33
    Code:
    window.location=password+".htm"}
    Looks like it is .htm, not html.


    Hmm.... weird script... guess it makes sense.

    If I were doing it, I'd rather have the username be the name of the next page... the password feels like it should be more secure than that. (Though there's no real reason for this... just superficially)

    Thanks a lot..

  6. #6
    Join Date
    Mar 2008
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by djr33 View Post
    Code:
    window.location=password+".htm"}
    Looks like it is .htm, not html.


    Hmm.... weird script... guess it makes sense.

    If I were doing it, I'd rather have the username be the name of the next page... the password feels like it should be more secure than that. (Though there's no real reason for this... just superficially)
    You can disable right-click so users cannot view the Page Source?

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
  •