LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 01-16-2006, 05:04 PM   #1
jun_tuko
Member
 
Registered: Oct 2005
Location: Seattle, WA
Distribution: Fedora Core 4
Posts: 67

Rep: Reputation: 15
Limit login attempt using JSP or JAVASCRIPT


Hello,
I would like to limit users to only have 3 tries to login to my website. If the username/password is not authenticated after the third try, i want to tell them that they cant login again till tomorrow.

can this be done in javascript? or jsp? could you please send me link on where to go? there's no returns when i search for this in google. is session the one or maybe cookies?

thanks i'll appreciate it.
 
Old 01-17-2006, 11:24 AM   #2
ajs318
LQ Newbie
 
Registered: Apr 2004
Location: East Midlands
Distribution: Debian SID; Mandrake
Posts: 17

Rep: Reputation: 0
You can't do it in JavaScript because JavaScript runs on the client side; the best you could do would be to set a cookie that would expire after awhile, and bar users from logging in as long as the cookie was set. Which would be all of a minute, tops, if they're using Firefox. You really want to do something like that on the server end.

But why do you want to limit login attempts to three per day anyway? If you treat people like criminals, they will act like criminals. You might think it's a clever programming feat; but it just might annoy somebody enough to launch a DoS against you. Big locks and alarm boxes are the best way to advertise your valuables.

Just use a normal .htaccess file. That's what it's for. It's in the Apache documentation. Anything else is likely to be at least a little bit less secure.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Limit the file upload size in JavaScript tooparam Programming 3 01-16-2006 09:02 AM
wrong login attempt limits jester_69 Linux - General 1 10-13-2003 01:57 PM
javascript or jsp question doublefailure Programming 1 11-13-2002 12:03 PM
boot disk required after login -- newbie, first intall attempt kgjac Linux - Software 1 10-10-2001 01:59 PM


All times are GMT -5. The time now is 12:12 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration