On 6/7/13 6:02 AM, Brett Tate wrote:

> Because the message is malformed, you can basically act however you want.  A 
> common philosophy is to be strict sending and lenient receiving.  Thus unless 
> you have a reason to do otherwise, you might want to allow the message to 
> continue.

While I generally agree with that philosophy, it is likely to have 
limited success in extreme cases like this.

"Being liberal" effectively means assigning a valid meaning to some 
invalid construct. If you guess a meaning that is consistent with the 
sender's intent, then all is well.

Sometimes this is straightforward - all reasonable people would infer 
the same meaning.

But in other cases there is no clear choice of a valid interpretation. 
If there are two likely choices, then maybe you have a 50-50 chance of 
doing something more useful than rejecting.

In this case, where there are three request headers, presumably to 
proceed you would need to assume it is one of the three. I suppose it is 
more likely that either the first or last is the right one than the 
middle one, so maybe you pick one of those. What are the odds of doing 
something reasonable? I think not very good. (Maybe all three messages 
were to have been sent, and all you got were the first lines of two and 
the full last message. Then if you process the last one you may 
correctly process one of the messages, but without the others things may 
still go south.)

IMO this is so broken that you are much better just rejecting it. And 
logging it, and later, based on the log, complaining to the sender that 
it needs to fix its implementation.

        Thanks,
        Paul
_______________________________________________
Sip-implementors mailing list
Sip-implementors@lists.cs.columbia.edu
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors

Reply via email to