4 ms·
“Be liberal in what you accept” rears its ugly head once more.
by School-Cotton 2y ago
“Be liberal in what you accept” rears its ugly head once more.
- eyelidlessness 2y agoBeing liberal in what you accept, also known as the “robustness principle”, doesn’t mean being ambiguous or surprising about how you accept it. If anything, robustness requires a great deal more precision and clarity (at least with your own reasoning, then with how you communicate what to expect from it).
- kazinator 2y agoPostel's Law does not deserve to be nicknamed the Robustness Principle. Robustness has a meaning and it refers to handling bad inputs gracefully. An example of a lack of robustness is allowing a malicious actor to execute arbitrary code by supplying a datum larger than some buffer limit. Trying to make sense of invalid inputs and do something with them isn't robustness. It's just example of making an extension to a spec. The extension could be robust or not. Postel's Law amounts to "have extensions and hacks to handle incorrectly formatted data, rather than rejecting them. So, OK, yes, that entails being robust to certain bad inputs that are outside of the spec, but which land into onto one of the extensions. It doesn't entail being robust to inputs that fall outside of the core spec and all hacks/extensions. Cherry picking certain bad inputs and giving them a meaning isn't, by itself, bona fide robustness; robustness means handling all bad inputs without crashing or allowing security to be compromised.
- hinkley 2y agoPandering to customers will make you a lot of money today but very narrow margins tomorrow. If you’re in startup mentality your bosses may be 100% fine with that. But you will likely be stuck supporting that crap because you didn’t become wealthy in the IPO/merger.
- munch117 2y agoPostel's law isn't about accepting arbitrary invalid inputs. It's about inputs that are technically invalid but the intent is obvious from looking at it, and handling those according to intent. In a distributed non-adversarial setting, this is exactly what you want for robustness. The problem, as we've come to realise in the time since Postel's law was formulated, is that there is no such thing as a distributed non-adversarial setting. So I get what you're saying. But your definition of robustness is too narrow as well. There's more to robustness than security. When Outlook strips out a certificate from an email for alleged security reasons, then that's not robustness, that's the opposite, brokenness: You had one job, to deliver an attachment from A to B, and you failed. Robustness and security can be at odds. It's quite OK to say, "on so and so occasion I choose to make the system not robust, because the robust solution would not be sufficiently secure".
- deleted 2y ago[deleted]
- inopinatus 2y agoYou are spot on in regards to consideration of adversarial context; however, it is instructive to review the nuanced difference between the RFC761 (1980) statement, viz. "be conservative in what you do, be liberal in what you accept from others" and the substitution of "send" for "do" in RFC1122 (1989). The latter is, with hindsight, an error, since it refocused the attention of some rigid thinkers entirely onto protocol mechanics and away from implementation behaviour, despite the commentary beneath that admonishes such a mindset and concurs wholly with your point. Or to put it otherwise, Postel was right to begin with, albeit perhaps just a little too cryptic, and has been frequently misquoted and misinterpreted ever since.
- kazinator 2y agoThe "liberal in what you accept" part is what is flat out wrong; is that being misquoted?
- inopinatus 2y ago
- inopinatus 2y agoThis has little to do with the robustness principle, however mis-stated. It's just shitty design. But if someone was still hell-bent on invoking it, then if anything, it's a straight-up violation of the adjacent words "be conservative in what you do"¹, and further disregards the commentary in RFC1122²: ... assume that the network is filled with malevolent entities that will send in packets designed to have the worst possible effect ... [1] https://datatracker.ietf.org/doc/html/rfc761#section-2.10 https://datatracker.ietf.org/doc/html/rfc761#section-2.10 [2] https://datatracker.ietf.org/doc/html/rfc1122#page-12 https://datatracker.ietf.org/doc/html/rfc1122#page-12
- senderista 2y agoThat works only when everyone is trying in good faith to follow the standard, i.e. basically never. My version of Postel's Law: If you accept crap, then eventually you will receive only crap.