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

Nils Ohlmeier nils at iptel.org
Thu May 28 21:50:36 CEST 2009


Am 28.05.2009 20:46 Uhr, schrieb Andrei Pelinescu-Onciul:
> On May 28, 2009 at 17:44, Nils Ohlmeier<nils at iptel.org>  wrote:
>> Hi,
>>
>>> 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.
>>> According to the BNF of 3261 generic parameters without parameters are
>>> allowed in To and From header.
>> as I received so far no feedback at all for this issue I'm wondering if
>> everybody is just fine with the fact that sip-router can not parse
>> parameter only values in To and From header (and maybe other headers which
>> use the parse_to function).
>> Or is everybody just still puzzled by this fact and still reviewing my patch?
> There were some problems with your patch. You assumed that CR or LF
> will mark the end of the parameter, but you can have the parameter
> continued on the next line. There was also a mixed value with name.
> I have a different patch, which I'll commit into andrei/to_parser_fix
> branch. It removes the special PINGTEL cases and fixes another
> theoretical problem when a parameter is at the end of string (not
> terminated by CR or LF, but by the end of the string/message).
>
> However I did only _very_ little testing. Could you run your tests on
> it? I don't want to merge the to_fix unless we are reasonably sure that it's
> good and it does not introduce some other bug.

Ok I will give detailed testing. But that could take some time.

BTW the To parser has even with this patch some more problems, e.g. null 
characters in display names are not treated correctly. So maybe we could 
take this branch to improve the To parser, give it real hard testing and 
then merge it later.

   Nils



More information about the sr-dev mailing list