Go Back   CodingForums.com > :: Client side development > JavaScript programming > Post a JavaScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rating: Thread Rating: 14 votes, 3.79 average.
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-23-2003, 07:02 PM   PM User | #16
relyt
Registered User

 
Join Date: Jan 2003
Location: CT
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
relyt is an unknown quantity at this point
i tried that. it just tells me "unable to find server" when i do it.
relyt is offline   Reply With Quote
Old 01-28-2003, 01:02 PM   PM User | #17
CrUdE
New Coder

 
Join Date: Jan 2003
Location: Belgium
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
CrUdE is an unknown quantity at this point
is it possible u gave the incorrect or incomplete url he has to get by submitting the login info?
__________________
"Hell, there are no rules here-- we're trying to accomplish something."
Thomas A. Edison (1847 - 1931)

"Any fool can make a rule, and any fool will mind it."
Henry David Thoreau (1817 - 1862)
CrUdE is offline   Reply With Quote
Old 01-29-2003, 01:09 AM   PM User | #18
whammy
Senior Coder

 
Join Date: Jun 2002
Location: 41° 8' 52" N -95° 53' 31" W
Posts: 3,660
Thanks: 0
Thanked 0 Times in 0 Posts
whammy is an unknown quantity at this point
BTW, I meant to comment on this before, but this is a pretty ingenious solution to client-side password protection.
__________________
Former ASP Forum Moderator - I'm back!

If you can teach yourself how to learn, you can learn anything. ;)
whammy is offline   Reply With Quote
Old 01-31-2003, 07:08 PM   PM User | #19
tempest1
New Coder

 
Join Date: Nov 2002
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
tempest1 is an unknown quantity at this point
Simple, clear your cache before you try to break your site. And then after you "cant" get through you browse your temp internet folders. Nothing in javascript is secure, nothing.
__________________
» ð, Ŵħąŧ¿ Ýőų łįķę¿
tempest1 is offline   Reply With Quote
Old 02-01-2003, 08:16 PM   PM User | #20
whammy
Senior Coder

 
Join Date: Jun 2002
Location: 41° 8' 52" N -95° 53' 31" W
Posts: 3,660
Thanks: 0
Thanked 0 Times in 0 Posts
whammy is an unknown quantity at this point
Apparently, tempest1, you didn't see how the scripts works... if the correct username and password isn't typed in, there's no javascript library to include - therefore, there is nothing in your cache to reveal a username and/or password.

You can look at the html all you want.

About as simple and secure as you can get with client-side scripting.
__________________
Former ASP Forum Moderator - I'm back!

If you can teach yourself how to learn, you can learn anything. ;)
whammy is offline   Reply With Quote
Old 02-02-2003, 04:54 AM   PM User | #21
tempest1
New Coder

 
Join Date: Nov 2002
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
tempest1 is an unknown quantity at this point
if its client side its cached.
__________________
» ð, Ŵħąŧ¿ Ýőų łįķę¿
tempest1 is offline   Reply With Quote
Old 02-02-2003, 11:13 AM   PM User | #22
Borgtex
Regular Coder

 
Join Date: Aug 2002
Location: Spain
Posts: 420
Thanks: 0
Thanked 0 Times in 0 Posts
Borgtex is an unknown quantity at this point
Person A wants to access page X and knows the password: the .js is called and cached in his computer, ok

Person B wants to access the same page X but it doesn't knows the password: The .js is never requested and consequently not cached in his computer

if person B looks at person A computer, he can discover the password or at least page X name

so the limitation of the script is that it's not very secure (like all client-side solutions) in a network or a public environment, where more than a person can access the same computer.

But as a individual user, it doesn't seems very probable that person A allows person B to use his computer to steal the code

__________________
Don't resist to assimilation. Billions of Borgs can't be wrong!
Borgtex is offline   Reply With Quote
Old 02-02-2003, 05:00 PM   PM User | #23
whammy
Senior Coder

 
Join Date: Jun 2002
Location: 41° 8' 52" N -95° 53' 31" W
Posts: 3,660
Thanks: 0
Thanked 0 Times in 0 Posts
whammy is an unknown quantity at this point
Borgtex, I have modified the script to make it XHTML 1.1 compliant, and instead of using the "BadPassword.htm" page, if not authorized, the user is sent back to the login page with an "Authorization Failed!" message.

With your permission (and credits intact, of course - actually I wouldn't mind if you supplied some better credits!), I would like to post the script on my site, as well.

Here it is.
__________________
Former ASP Forum Moderator - I'm back!

If you can teach yourself how to learn, you can learn anything. ;)
whammy is offline   Reply With Quote
Old 02-02-2003, 05:20 PM   PM User | #24
Borgtex
Regular Coder

 
Join Date: Aug 2002
Location: Spain
Posts: 420
Thanks: 0
Thanked 0 Times in 0 Posts
Borgtex is an unknown quantity at this point
Quote:
Originally posted by whammy
Borgtex, I have modified the script to make it XHTML 1.1 compliant, and instead of using the "BadPassword.htm" page, if not authorized, the user is sent back to the login page with an "Authorization Failed!" message.

With your permission (and credits intact, of course - actually I wouldn't mind if you supplied some better credits!), I would like to post the script on my site, as well.

Here it is.

Nice! and of course you can post it in your site.
I'll PM you the credits
__________________
Don't resist to assimilation. Billions of Borgs can't be wrong!
Borgtex is offline   Reply With Quote
Old 02-02-2003, 05:24 PM   PM User | #25
whammy
Senior Coder

 
Join Date: Jun 2002
Location: 41° 8' 52" N -95° 53' 31" W
Posts: 3,660
Thanks: 0
Thanked 0 Times in 0 Posts
whammy is an unknown quantity at this point
__________________
Former ASP Forum Moderator - I'm back!

If you can teach yourself how to learn, you can learn anything. ;)
whammy is offline   Reply With Quote
Old 02-08-2003, 11:26 AM   PM User | #26
whammy
Senior Coder

 
Join Date: Jun 2002
Location: 41° 8' 52" N -95° 53' 31" W
Posts: 3,660
Thanks: 0
Thanked 0 Times in 0 Posts
whammy is an unknown quantity at this point
Borgtex, you have the honor of being the first person besides me to have a script posted on my website!

http://www.solidscripts.com/displayscript.asp?sid=15

__________________
Former ASP Forum Moderator - I'm back!

If you can teach yourself how to learn, you can learn anything. ;)

Last edited by whammy; 02-15-2003 at 11:46 PM..
whammy is offline   Reply With Quote
Old 02-08-2003, 05:28 PM   PM User | #27
ca_redwards
Regular Coder

 
Join Date: Dec 2002
Posts: 169
Thanks: 0
Thanked 0 Times in 0 Posts
ca_redwards is an unknown quantity at this point
Arrow I have had a JavaScript password scheme for years...

On my resume page, I have had the same password scheme in use for four years.

Basically, whatever the user types in is taken as the pathless/extensionless filename of an image. If the user-named image loads successfully, then the browser is forwarded to a web page of the same name.
Code:
<script language=javascript>
function imgError() 
{ alert('Sorry, that is not correct.'); 
  document.enter.password.value='';
}
function imgLoad() { window.location=this.password+'.html'; }
function tryit() 
{ var I = new Image(1,1) 
I.onerror=imgError;
I.onload= imgLoad;
I.password=document.enter.password.value;
I.src='images/'+I.password+'.gif';
}
</script>
<form name=enter><input type=password name=password><input type=submit value=login></form>
Basically, if you don't know the password, this script doesn't know what page to display!
ca_redwards is offline   Reply With Quote
Old 02-10-2003, 01:18 AM   PM User | #28
kwhubby
Regular Coder

 
Join Date: Nov 2002
Location: Carmel California
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
kwhubby is an unknown quantity at this point
one problem with this script, is that if someone uses this on a computer, anybody can than go onto that computer and look at the history and go to the personal page, wich, if the password was what that person always uses, would let the unwanted know there password. and you could also look at index.dat if the history was simply deleated.
__________________
Kris Hubby
kwhubby site
kwhubby is offline   Reply With Quote
Old 02-11-2003, 03:19 AM   PM User | #29
whammy
Senior Coder

 
Join Date: Jun 2002
Location: 41° 8' 52" N -95° 53' 31" W
Posts: 3,660
Thanks: 0
Thanked 0 Times in 0 Posts
whammy is an unknown quantity at this point
Well, it's a client-side script. Of course that's a drawback. If you're trying to say it's better to use server-side scripting for logins, of course you're right.



But like I said, this is the best client-side script I've seen. ca_redwards' script uses the same idea, but it's not as easily modified by newbies, and it also uses the image name as the "redirect" file name, instead of allowing you to modify the URL as Borgtex's script does (which also allows for multiple users very easily)... so Borgtex's script wins handily by it's simplicity and "security" (what there can be in client-side scripting), in my opinion.
__________________
Former ASP Forum Moderator - I'm back!

If you can teach yourself how to learn, you can learn anything. ;)
whammy is offline   Reply With Quote
Old 03-03-2003, 05:56 PM   PM User | #30
hallj999
New Coder

 
Join Date: Feb 2003
Location: dudley west mids uk
Posts: 90
Thanks: 0
Thanked 0 Times in 0 Posts
hallj999 is an unknown quantity at this point
when i enter my username and pass word and click login, the page next page when loading displays http://myweb.tiscali.co.uk/streetracer/chkpwd undefined password. then it wont load the page and a cannot find server error comes up
whats that about and how do i fix it, joe
__________________
HASAAKI v.2.0 now up come and visit us at http://www.online-addicts.com/~joehall
hallj999 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:09 AM.


Advertisement
Log in to turn off these ads.