- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
But that's clearly retarded and thus not worthy of consideration. Obviously if you use a stupid CRAM then it might rely on reversible encryption. The solution is to use a decent authentication method.
Admin
Actually, since this is a Click handler on a dialog's OK button, I rather figure this to be a UserPasswordCheck form, instantiated with user name & current correct password (the _Password variable). So as long as a user has a current password, the code works; a user with no password set can use any password that's in the database (and this may or may not be an edge case, depending on whether the system lets you set an empty password at all).
The password's still in plaintext, and the above behaviour is odd to say the least, but to me it's not exactly a huge WTF - at least not without more of the code's context.
Admin
Aeons ago, back when I was in middle school, I met someone else in my school who also owned a computer with a modem.
He gave me the number for his favorite BBS, and that night I tried it for the first time.
Username "James Bond" (hey, I was 12, and a big fan) Password ">007<" (symbols to be extra secure)
and it worked... but I already had private mails?
Turns out, the guy at my school not only used the same online name as I usually did (which I didn't know beforehand, I didn't get his username, just the phone #), he also used the EXACT SAME PASSWORD.
How's that for amazingly weird?
Admin
This is actually a feature! This way, your password will work even if you forget your username!
Admin
I don't use the dataset type because datatables are so much easier, but I believe that anytime you get a result set from the database, whether there are 0 rows or 1000, it will not be "nothing".
So this line will accept every password that anybody might possibly type in:
Admin
Admin
^^^ This.
And this too. Don't get me wrong. I love VB, but goddamit, of all things MS dialect of SQL is hideous beyond description.
Admin
For example that the application already knows the password (_Password) before the user clicks on OK. Only if it couldn't find a _Password it looks in the database if it can find whatever string you entered.
Admin
If the company has programming staff "Gandalf" will probably work too...
Admin
I pray to God, Allah, Buddha, Bob and The Flying Spaghetti Monster that you are not a developer, mister Daniel Pope. I've met people like you before, one of them had worked for the national bank of a small country and was now working for a financial company in London. Just like you, he was a security expert. Challenge response authentication DOES NOT require unencrypted passwords. In fact, unencrypted passwords are only one type of challenge response authentication, and it's the most insecure. I supposed all those crypto people working on secure authentication protocols are just fools and the zero-knowledge password proofs they have invented/implemented are basically the same to you as invisible pink unicorns.
For example, your bank exposes you to unnecessary risks. Asking for individual characters either weakens your password's resistance to brute force, exposes itself (and you) to denial of service attacks or just provides you a false sense of security. I would love it if you could tell me the name of your bank... and maybe your username too...