login username from database  
Author Message
Trev





PostPosted: 2007-5-18 2:46:00 Top

java-programmer, login username from database Hi,

I have a login window with a username and password fields. The
program checks the username and password from a mysql DB table. If I
enter a username that is not in the database, how do I get it to
display a message that the username does not exist.

Thanks
Trevor

 
Richard Reynolds





PostPosted: 2007-5-18 4:24:00 Top

java-programmer >> login username from database
"Trev" <email***@***.com> wrote in message
news:email***@***.com...
> Hi,
>
> I have a login window with a username and password fields. The
> program checks the username and password from a mysql DB table. If I
> enter a username that is not in the database, how do I get it to
> display a message that the username does not exist.
>
> Thanks
> Trevor
>
JOptionPane?


 
rossum





PostPosted: 2007-5-18 8:43:00 Top

java-programmer >> login username from database On 17 May 2007 11:45:48 -0700, Trev <email***@***.com> wrote:

>Hi,
>
>I have a login window with a username and password fields. The
>program checks the username and password from a mysql DB table. If I
>enter a username that is not in the database, how do I get it to
>display a message that the username does not exist.
>
>Thanks
>Trevor
That is insecure, you are giving out more information than needed.
Just say "Invalid username/password" so any attacker does not know
whether it is the username, the password or both that failed. This
makes it more difficult for them to try all possible combinations.

rossum