PDA

View Full Version : Encrypted Password script



missmissy
06-08-2006, 03:33 AM
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 (http://www.dynamicdrive.com/dynamicindex9/password.htm)
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

djr33
06-08-2006, 05:14 AM
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?

Jack
06-08-2006, 05:14 AM
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!

djr33
06-08-2006, 05:19 AM
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)

missmissy
06-08-2006, 05:18 PM
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..

Jacky1
03-02-2008, 05:27 PM
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?