Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The Robustness principle isn't, and Postel's Law is pretty much a failure. This kind of thinking introduces tons of implementation compatibility issues. By being liberal in accepting from others (aka accepting malformed messages), you allow broken implementations to "work". Now those broken implementations form a de facto standard that everyone else must implement.

I demonstrated how this kind of thinking, coupled with "simple" text-based protocols, introduces security issues. SIP is a protocol with nutty parsing rules like HTTP. Lines end with CRLF, body is separated from headers by two CRLFs.

Some implementations act liberal and will accept any combination of CR and LF instead of just CRLF. So header \r\r body is OK with some implementations, and not others. Which means some stacks will read body as more headers. It's not hard to see how this creates a security problem, as you pass a message to a trusted proxy and it asserts things are OK, except the two stacks don't agree on what the headers actually are. Oops. This is a real, live, issue that affects SIP networks today and can be exploited for profit. And it's hard to fix, because some networks are actually sending non-CRLF lines, creating a compat issue. If implementations had been harsh on the CRLF requirement, those networks wouldn't be sending non-CRLF lines, as it would never have worked in the first place.

In short, being liberal just means "each implementation creates its own interpretation". This is because not all impls are going to agree on what "liberal" means. And if "liberal" could be defined, then it should be defined in the spec! No need for interpretations.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: