|
-
Jun 27th, 2006, 07:47 PM
#1
Thread Starter
Lively Member
How do you verify a password with upper and lower case?
I know how to verify a password that is the exact words but I don't know how to verify a password with upper and lower case to it.
What is some of the method to get this done?
Thanks!
Don
-
Jun 28th, 2006, 12:34 AM
#2
Thread Starter
Lively Member
Re: How do you verify a password with upper and lower case?
This would be relating to what is shown in the database, not confirming between two textbox(Password and Confirm Password)
-
Jun 28th, 2006, 12:56 AM
#3
Re: How do you verify a password with upper and lower case?
What server you are using
-
Jun 28th, 2006, 06:54 PM
#4
Thread Starter
Lively Member
Re: How do you verify a password with upper and lower case?
Window 2000 server and Windows XP for development testing.
What does this has to do with the server? I don't understand.
-
Jun 28th, 2006, 07:29 PM
#5
-
Jun 29th, 2006, 09:44 PM
#6
Thread Starter
Lively Member
Re: How do you verify a password with upper and lower case?
 Originally Posted by rabid lemming
That’s just an idea like. If you wanted to make it so the user had to have a user name who's letter were the exsact same case as one in a data base to mach i.e. “MyPasSWoRD” would have to be like that to mach the database to be allowed, then would it not just be an exact string match ? 
yeah, that what I thought too but it didn't work. I'm using MS Access for the web application.
-
Jun 30th, 2006, 12:08 PM
#7
Re: How do you verify a password with upper and lower case?
If you are doing the comparison in the database itself, the database is by default not case sensitive. You would have to load it in to a local (to the program itself) variable and then do the comparison in the program.
However, you aren't storing passwords in plain text in your database are you? ARE YOU?
o_O
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
-
Jul 1st, 2006, 01:58 PM
#8
Re: How do you verify a password with upper and lower case?
 Originally Posted by tripnotic
I know how to verify a password that is the exact words but I don't know how to verify a password with upper and lower case to it.
What is some of the method to get this done?
Thanks!
Don
You shouldn't have to, and shouldn't.
-
Jul 6th, 2006, 09:46 PM
#9
Thread Starter
Lively Member
Re: How do you verify a password with upper and lower case?
 Originally Posted by Lord_Rat
If you are doing the comparison in the database itself, the database is by default not case sensitive. You would have to load it in to a local (to the program itself) variable and then do the comparison in the program.
However, you aren't storing passwords in plain text in your database are you? ARE YOU?
o_O
This is what I do:
objCmd = new OleDbCommand("SELECT * FROM Employees WHERE Username='" + strUsername + "' AND Password='" + strPassword + "'", objConn);
return true if there is any record found. Am I checking the password wrong?
Plain text as in the data type set as TEXT? if so, then Yes.
 Originally Posted by mendhak
You shouldn't have to, and shouldn't.
what do you mean by I shouldn't?
-
Jul 7th, 2006, 11:24 AM
#10
Re: How do you verify a password with upper and lower case?
 Originally Posted by tripnotic
what do you mean by I shouldn't?
It implies that you're storing the passwords as plaintext in your database. (Which is bad)
Second, you're creating inline SQL statements which are open to SQL injection attacks. (Which is bad)
Third, passwords should be case sensitive anyways, but you're looking to match the passwords up no matter the case. (Which is bad)
-
Jul 7th, 2006, 12:07 PM
#11
Re: How do you verify a password with upper and lower case?
Your last part is wrong, Mend. His problem was that he WANTED them to be case sensitive, but they were passing regardless of case.
Trip, here is the *proper* way of doing passwords:
Develop a hash. The Cryptographic provider of .Net makes doing so much less of a pain than it used to be.
When a user sets up a password for the first time, hash it against your internal cryptographic provider and then store the hash in the database.
When a user attempts to log in again, read the hash from the database, something like this:
SELECT Hash FROM tblUserInfo WHERE UserName = @UserName
You define @UserName using Parameterization (a quick search on these boards should tell you everything you wanted to know about Parameterization)
Then, you take the hash you read out of the database and compare it to the hash you just generated from their password. If they match, you log them in. If not, you tell them to give their PC to their grandmother and never touch the Internet again.
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
-
Jul 7th, 2006, 12:14 PM
#12
Re: How do you verify a password with upper and lower case?
His first line was confusing enough
-
Jul 7th, 2006, 02:17 PM
#13
Re: How do you verify a password with upper and lower case?
But the implied statement of course, is that you were right on the first two points, =)
And that third eye.... that's something else =)
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
-
Jul 13th, 2006, 06:55 PM
#14
Thread Starter
Lively Member
Re: How do you verify a password with upper and lower case?
 Originally Posted by mendhak
It implies that you're storing the passwords as plaintext in your database. (Which is bad)
Second, you're creating inline SQL statements which are open to SQL injection attacks. (Which is bad)
Third, passwords should be case sensitive anyways, but you're looking to match the passwords up no matter the case. (Which is bad)
So use store procedure with parameterization to verify login and password rather inline sql statements? Or there is something else you are recommending? The code above is what I learn through a book 2 years ago and didn't learn the right way of verify logins.
Sorry about confusing you, I was referring to check the password that is case-sensitive but couldn't think of the right term at the time.
 Originally Posted by Lord_Rat
Trip, here is the *proper* way of doing passwords:
Develop a hash. The Cryptographic provider of .Net makes doing so much less of a pain than it used to be.
Thanks! I also learn how to salt the password before hashing it.
-
Jul 15th, 2006, 06:00 AM
#15
Re: How do you verify a password with upper and lower case?
 Originally Posted by tripnotic
So use store procedure with parameterization to verify login and password rather inline sql statements?
Yep, that's what I'm recommending.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|