[OpenSIPS-Devel] Patch: BNF-compliant {s.escape.param} and {s.escape.user}

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Sep 20 10:30:55 CEST 2012


Hello Rick,

I just uploaded your patch on SVN trunk (once tested, it will me 
backported to 1.8 also).

I reworked a bit the part for param escaping to strictly follow the RFC 
list (of chars that should not be escaped). See my commit on SVN.

If you find any issues with my changes, please let me know.

In the meanwhile, thanks a lot for your patch!

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 09/17/2012 03:01 PM, Rick van Rein wrote:
> Hello,
>
> When packing a SIP URI into a parameter, I noticed that the contained
> @ was not escaped by {s.escape.param}.  Chasing this to strcommon.c I
> found that it deviates from the -unreserved specifications in the BNF
> of RFC 3261.  Attached is a patch relative to 1.8.0 that corrects the
> user and parameter escapes to the RFC-prescribed BNF-based escapes.
>
> Note well:
>   - The&  in parameters was escaped, which this patch removes.
>   - The / in user parts was escaped, which this patch removes.
> If these were added for pragmatic reasons (dealing with devices that
> do not adhere to the RFC) then please overrule that part of my patch!
>
> Other than this, changes to become RFC3621-compliant are:
>   - Additional parameter escaping for # %<  >  @ \ ^ ` { | }
>   - Additional user part escaping was not needed
>
>
> I hope this is useful.  Just consider it a thank you for all the
> wonderful work that the OpenSIPS developers are doing.
>
>
> Best wishes,
>
> Rick van Rein
> OpenFortress
>
>
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20120920/36746a26/attachment-0001.htm>


More information about the Devel mailing list