News for hackers. Stuff that matters.
Re:Postgres: Boundless `Text` and Back Again by iammisc on Friday September 10, 2021 @02:41PM (#28485527)
My goodness... This has nothing to do with postures and just bad security models when programming.
Re:Postgres: Boundless `Text` and Back Again by brandur on Friday September 10, 2021 @02:43PM (#28485540)
> My goodness... This has nothing to do with postures and just bad security models when programming.

Author here. Could you elaborate with some specifics?

Re:Postgres: Boundless `Text` and Back Again by wswope on Friday September 10, 2021 @06:05PM (#28487432)
The person you’re replying to is being needlessly condescending, but I suspect what they’re getting at is that having a mindset of “what possible undesirable/malicious inputs are possible from this web form?” really precludes this scenario. Using unbounded text fields for a web form is a serious rookie move, as it’s a very obvious form of undesirable/malicious input. Point being, if you mess that up, what more subtle and dangerous inputs might you also be leaving yourself open to?
Re:Postgres: Boundless `Text` and Back Again by iammisc on Friday September 10, 2021 @06:18PM (#28487540)
You should always validate input to a database. Data ought to be validated at the edge, which in this case is the http endpoints. You should not rely on internal services (a database) to do validation

One of the dangers in switching to high level languages is that people have lost any sense of data size. In C you almost always specify a max string width because that is the easiest easy to deal with strings. While C has many shortcomings, forcing the responsible programmer to deal with string width is a good thing.

Honestly as a stripe user, this sort of unvalidated input terrifies me. Stripe deals with money. All inputs ought to be validated. I figured the company would spend a lot of engineering time making sure data was cleaned and couldn't escape like this.

Today it's a string width issue. Tomorrow it's a sql injection. I'm surprised stripe let you publish this.

Re:Postgres: Boundless `Text` and Back Again by kam on Friday September 10, 2021 @06:59PM (#28487808)
What does string width have to do with SQL injection? You use parameterized queries, not just rely on your validation to reject quotes, right?
Re:Postgres: Boundless `Text` and Back Again by iammisc on Saturday September 11, 2021 @12:18AM (#28489396)
I do... Yes. I follow best practices like parameterized queries, string width validation, password hashing via memory intensive hash functions etc. These are all basic beat practices. When a company admits to not doing one, it makes me worry about the others.

This is the result of build fast and break things mentality which is toxic