4 ms·
how does the "structure" of the data have anything to do with leaking information? Seems like data protection occurs way lower in the stack like https and encr
by nerdchum 3y ago
how does the "structure" of the data have anything to do with leaking information?
Seems like data protection occurs way lower in the stack like https and encryption at rest.
- Scalestein 3y agoI'm guessing they are thinking of a scenario where SELECT * FROM User_Details gets sent directly to the front end. So even if all you are displaying is the users name or initials you would still be sending things like SSN and credit card number to the front end
- nerdchum 3y agoSanitizing your inputs is a string issue not a data structure issue. Sanitizing your inputs has been known about for literally almost half a century that should just be default for developers at this point.
- waboremo 3y ago>Sanitizing your inputs has been known about for literally almost half a century that should just be default for developers at this point. Except if you're a "stupid programmer", in which such defaults are irrelevant to you. In such cases, one can only hope they're relying on tooling that sanitizes as much as possible for them.
- ang_cire 3y agoBecause of things like mass assignment or IDOR, or injection attacks, presumably. Handing data from the user (untrusted input) directly to the backend unchanged is going to in 99.9999999% of cases also mean it's unchecked. "I'm not smart enough to bother sanitizing my input, or to learn about stuff that's someone else's job like security" would fit right into this "manifesto".
- nerdchum 3y agoSanitizing data is string based not data structure based though.
- ang_cire 3y agoWell first off, that's not correct anyways; type-conformancy is a very valid and important part of data sanitization. E.g. does the SSN consist of 3 valid integers split on dashes? If not, it ain't a proper SSN. Catching that typeError is much safer than trying to roll regex or character allow/blocklists. But also, the manifesto never mentions data structures. It says > I’m not smart enough to figure out how to transform data between different layers of the system, so I just don’t. I use the same represetnation in the UI layer and the storage layer. Transforming data means actually changing the data, not the data structure that houses it. The author is explicitly talking about making changes to the data itself.
- nerdchum 3y agoYou 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.
- ang_cire 3y agoYou 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.
- Solvency 3y agoYou're taking about securing the data itself, which has nothing to do with its parent structure.
- TheOtherHobbes 3y agoData protection also happens at a much lower level. If you're running your binary blob on a server with no firewall you will be hammered with constant root hacks. https and REST encryption will be irrelevant. Even worse, you may be running a mail server on the same machine.
- nerdchum 3y ago> hammered with constant root hacks. That happens to every server exposed to the internet. Unless there is a targeted ddos event its usually on the level of a query or two per second AT MOST or so. Its something most people don't worry about because theres no way around it. If you need ddos protection you put the server behind cloudflare or something like it. Its totally fine to raw dog the internet without a firewall in my opinion if the server only has a single web server that you keep updated and sanitize your inputs. Running other services on the same server without a firewall becomes horrible though youre right. lol