[sr-dev] [SR-Dev] To parser bug

Nils Ohlmeier nils at iptel.org
Fri May 29 18:53:33 CEST 2009


> El Viernes, 29 de Mayo de 2009, Nils Ohlmeier escribió:
>> > 2009/5/28 Nils Ohlmeier <nils at iptel.org>:
>> >>> during testing SER at SIPit 24 I discovered something what I believe
>> is
>> >>> a major bug in the To and From header parser of SER.
>> >>>
>> >>> When you send a request with a To or From header like this:
>> >>>   To: <sip:nils at invalid.com>;foo
>> >>> the To header parameter parser fails, and the whole To header is not
>> >>> parsed.
>> >
>> > Hi Nils, I'm trying it in Kamailio 1.5 (sending a request with "To:
>> > <sip:nils at invalid.com>;foo") and no error occurs.
>> > Does it just affect to SR?
>>
>> I would think that Kamailio is affected as well, because To header
>> parameter parser code is in the SER CVS since 2002 and was basically not
>> touched since then. So if not somebody in the Kamilio project fixed this
>> it should be the same.
>> During my tests I found out that it is important that you are using a
>> configuration which actually tries to parse the To header at all. For
>> example if you send an OPTIONS request to the iptel.org server (not a
>> user), the To header can be as ugly as you want (you will always get a
>> 200
>> OK), because the configuration does not care the To header at all. But
>> if
>> you send a REGISTER with such a To header you will not get any response
>> at
>> all.
>
> Nils, I'm sending REGISTER with "To: <sip:anonimous at domain.org>;qwe" and
> Kamailio gives no error (and stores the user location right.

Hmmm that is strange, because from looking at the Kamailio code via
viewsvn it looks identical to the one from SER.
I'll try to reproduce it with Kamailio myself, but that could take some time.

Regards
  Nils




More information about the sr-dev mailing list