News for hackers. Stuff that matters.
Re:Ask HN: Review my App - Freeciv.net by dannytatom on Saturday December 19, 2009 @08:30PM (#1005543)
I only have one real complaint, and that is this:

    The email or password contains invalid invalid characters.
    Only letters (A-Z) and numbers (0-9) are allowed.
What's the point in not allowing special characters in a password (serious question)?
Re:Ask HN: Review my App - Freeciv.net by Groxx on Sunday December 20, 2009 @05:26PM (#1006697)
Ignore most of the other comments threading from this point, and HASH THE PASSWORDS with a salted hashing scheme. If it's not salted, it's almost as bad as not encrypting them at all. Hashed passwords are character-agnostic as well, so the only reason to limit your character-space then becomes preventing injection... which you should be using a library to do for you, because, frankly, "they" know better, and it's been more heavily tested than your code.

If you're storing passwords in ANY reversible format, you're a threat to every user's security. It's part of why I like OpenID: if your server is compromised, I'm not.

Re:Ask HN: Review my App - Freeciv.net by eru on Saturday December 19, 2009 @08:49PM (#1005565)
Good question. Some banks (and other large companies) also seem to dislike them in passwords.
Re:Ask HN: Review my App - Freeciv.net by pyre on Saturday December 19, 2009 @09:35PM (#1005613)
Some stupid rule thought up by someone that is trying to force users to make passwords that they can remember. Like some sort of Web/IT version Clippy saying, "I see you're trying to enter a password with a '+' in it. Are you sure that isn't a typo?"

Either that or their backend software is incompetent (as well as the people that made it) and can't handle pattern-matching outside of [:alnum:] or can't store character values outside of [:alnum:]. It's the same reason that there are many sites that you can't use the 'md5 a single password against the site's domain name' trick because they limit password length to 8 or 16 characters (as if they are some sort of 'accepted industry standard').

Re:Ask HN: Review my App - Freeciv.net by durin42 on Saturday December 19, 2009 @11:33PM (#1005731)
I like that idea of using some sort of standard hash and password pairing along with the domain to come up with a password that's site-unique. Is that original, or taken from somewhere?

Have you considered using base64 or some other encoding to shorten the string?

Re:Ask HN: Review my App - Freeciv.net by pyre on Sunday December 20, 2009 @03:53PM (#1006559)
Maybe I'm misunderstanding, but the string will already be Base64 if it's human readable (I'm not trying to use character 254 as part of my password) and base64 encoding actually grows the data you are encoding (since you are breaking some bytes down into two bytes to make them both human readable).

The problem being length. Human-readable (ascii-armored/whatever) hashes (md5/sha-1/sha-256) have standard lengths which are usually longer than the maximum size of the password fields.

Re:Ask HN: Review my App - Freeciv.net by durin42 on Monday December 21, 2009 @11:32AM (#1008074)
I was assuming he was using the hex digest of the hash. You have to use some kind of ascii armoring, and base64 seemed like one that'd be reasonably safe.
Re:Ask HN: Review my App - Freeciv.net by janzer on Sunday December 20, 2009 @12:11AM (#1005765)
I've used the extension from passwordmaker.org for quite some time. It implements this basic idea quite nicely.
Re:Ask HN: Review my App - Freeciv.net by crux_ on Sunday December 20, 2009 @11:22AM (#1006260)
Besides passwordmaker there's also the PwdHash firefox extension; I've been using that one for a while.
Re:Ask HN: Review my App - Freeciv.net by theycallmemorty on Saturday December 19, 2009 @09:52PM (#1005640)
I think banks to alpha-numeric so you can type them in on the phone.
Re:Ask HN: Review my App - Freeciv.net by munctional on Saturday December 19, 2009 @09:27PM (#1005599)
It reduces the keyspace that needs to be searched when bruteforcing... leading to accounts being compromised more easily. That's about it.
Re:Ask HN: Review my App - Freeciv.net by Scriptor on Sunday December 20, 2009 @01:55AM (#1005859)
At the same time, I think it's just a really quick/lazy way to prevent SQL injection.
Re:Ask HN: Review my App - Freeciv.net by akirk on Sunday December 20, 2009 @07:27AM (#1006065)
well you have already lost if you try to insert the password into the database without applying a salted hash function on it.
Re:Ask HN: Review my App - Freeciv.net by TeHCrAzY on Sunday December 20, 2009 @09:10PM (#1006985)
Don't most "web" languages support parameters in the same was .NET does (at least with Sql Server)?
Re:Ask HN: Review my App - Freeciv.net by lt on Sunday December 20, 2009 @08:34AM (#1006109)
I hate when pages say my email is invalid because it has a plus sign in it.
Re:Ask HN: Review my App - Freeciv.net by Tobias42 on Sunday December 20, 2009 @12:22PM (#1006316)
Is it even possible to enter any valid email address there? I have an email address whose only special character is the dot before the top level domain and it doesn't get accepted.