[asterisk-dev] [Code Review] 3923: CallerID: Fix parsing of malformed callerid strings

opticron reviewboard at asterisk.org
Tue Aug 19 14:20:53 CDT 2014



> On Aug. 19, 2014, 1:05 p.m., rmudgett wrote:
> > branches/1.8/main/callerid.c, line 1111
> > <https://reviewboard.asterisk.org/r/3923/diff/1/?file=66611#file66611line1111>
> >
> >     I am wondering if ast_callerid_parse() should be escaping the quotes at all.  The job of ast_callerid_parse() is to take the string and separate it into a name and number string.  Escaping characters seems wrong.  If anything, the routine should be unescaping character sequences.  The consumers likely don't know how to handle escaped quotes or may need to escape characters differently.

You make a good point. This is going to take a bit to rework since I need to identify consumers of callerid information and have them escape quotes where necessary.


- opticron


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3923/#review13120
-----------------------------------------------------------


On Aug. 18, 2014, 8:55 p.m., opticron wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3923/
> -----------------------------------------------------------
> 
> (Updated Aug. 18, 2014, 8:55 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This allows the callerid parsing function to handle malformed input strings and strings containing escaped and unescaped double quotes. This also adds a unittest to cover many of the cases where the parsing algorithm previously failed.
> 
> 
> Diffs
> -----
> 
>   branches/1.8/tests/test_callerid.c PRE-CREATION 
>   branches/1.8/res/res_agi.c 421326 
>   branches/1.8/main/privacy.c 421326 
>   branches/1.8/main/manager.c 421326 
>   branches/1.8/main/callerid.c 421326 
>   branches/1.8/include/asterisk/callerid.h 421326 
>   branches/1.8/channels/chan_unistim.c 421326 
>   branches/1.8/channels/chan_misdn.c 421326 
>   branches/1.8/apps/app_voicemail.c 421326 
>   branches/1.8/apps/app_dial.c 421326 
> 
> Diff: https://reviewboard.asterisk.org/r/3923/diff/
> 
> 
> Testing
> -------
> 
> Ran the unittest.
> 
> 
> Thanks,
> 
> opticron
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140819/6e1895fc/attachment.html>


More information about the asterisk-dev mailing list