homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

javascript and password

 12:11 pm on Nov 6, 2004 (gmt 0)

If a visitor wants to go the the password protected page, they must first enter the correct password on the previous page. (Note: The password is the protected filename without the .html ending.)
This method is secure as long as the person cannot find out the name of all the files on your server. Is it possible to stop them knowing the names of all the files on my server?


var password = ''
password=prompt('Please enter your password:','');
if (password!= null) {
location.href= password + ".html";


So my question is:

Is it possible for a website viewer to see all the filenames on my server? Perhaps to bring up some kind of index to see all the files on my server?

If so they would be able to crack this password system. Tragedy!

By the way - I know that server side is the way to go for security - but just humour me. I am trying to do it with javascript.

Would really appreciate some advice. Thanks guys.



 12:38 am on Nov 8, 2004 (gmt 0)

Well, rhodopsin: Perl and CGI can access a directory of your server, so I would not suggest using this approach.


 8:57 am on Nov 8, 2004 (gmt 0)

Perl and CGI can access a directory of your server

Thanks for your post mate. Just wondering what u mean by the above - I know that I can access my directories with Perl and CGI. Do u mean visitors to my website - who hypothesise a weakness and with their own server - could use Perl and CGI on their server to access my directories, on my server?


 10:17 pm on Nov 9, 2004 (gmt 0)

Perl and CGI scripts can be used to access folder directories, even from other websites.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved