Live data from Hacker News

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

id.uni-lj.si

31–40 of 254 posts

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

#31
post #27
post #13

Earlier quoted context omitted.

I mean, this is a gross misunderstanding of how user input makes its way into a database safely. If you're putting out error messages like this it's a giant red flag.

It is also very common not to do things right. https://www.bbc.com/future/article/20160325-the-names-that-b... That article is a few years old now and things should have got better, but even by 2016 everyone should have known properly sanitising inputs was critical for a decade or two.

[deleted]

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

#32
post #27
post #13

Earlier quoted context omitted.

I mean, this is a gross misunderstanding of how user input makes its way into a database safely. If you're putting out error messages like this it's a giant red flag.

It is also very common not to do things right. https://www.bbc.com/future/article/20160325-the-names-that-b... That article is a few years old now and things should have got better, but even by 2016 everyone should have known properly sanitising inputs was critical for a decade or two.

Right but that's not really an excuse not to do them right.

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

#34
Until very recently the online banking password for a major (big-5) Canadian bank couldn't be longer than 9 characters or contain ANY special punctuation characters from the ASCII code set. It was very clear that they're storing them in plaintext in a database on some archaic mainframe somewhere.

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

#35
I expect this will attract a lot of criticism, but I actually think it's a good idea, at least in some cases.

There are a lot of people writing bad code and bad system architectures for their organizations. There are not enough people with the competence, organizational power, and time to catch what's bad and force change in those organizations. In the US you are probably forced to do business via many such terribly coded websites, e.g. your local healthcare provider. In such cases, it might be better if we assumed the implementation might be as awful as it commonly is, and recommended mitigations based on that.

It's also easy for people to test if the website actually allows the nominally prohibited password patterns and complain to some oversight authority if so. Whereas it's not so easy to test, from the outside, whether it's really been done the right way.

It's inelegant and tragic, but in the end it might be a good idea to accept that things are often done poorly and without adequate oversight, and consider what mitigations can prevent the worst outcomes in these cases.

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

#37

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

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

Absolutely right-- the warning is only necessary if they're not hashing the password before templating the string prior to storage.
Post reply on HN