News for hackers. Stuff that matters.
Re:The Stupid Programmer Manifesto by nerdchum on Thursday June 15, 2023 @01:15PM (#36343683)
You shouldnt have to "transform" the data though.

You should validate the data and sanitize the data...but if youre transforming data youre headed into a state management nightmare.

State management is the number one enemy and other than sanitizing and validating both the data and structure should be considered mostly immutable.

Re:The Stupid Programmer Manifesto by ang_cire on Saturday June 17, 2023 @02:31PM (#36373014)
You absolutely may need and want to transform data.

You don't want to store code unmodified in a database; that's how you end up with SSTI or stored XSS. You encode special characters in a simple, reversible way (as one example).

Similarly, you don't store passwords untransformed in a db, you hash them. That's a transform.

There are tons of examples like this.