[asterisk-bugs] [JIRA] (ASTERISK-24751) Integer values in json payload to ARI cause asterisk to crash

Asterisk Team (JIRA) noreply at issues.asterisk.org
Wed Jul 27 10:26:10 CDT 2016


     [ https://issues.asterisk.org/jira/browse/ASTERISK-24751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Asterisk Team updated ASTERISK-24751:
-------------------------------------

    Target Release Version/s: 14.0.0

> Integer values in json payload to ARI cause asterisk to crash
> -------------------------------------------------------------
>
>                 Key: ASTERISK-24751
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24751
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>    Affects Versions: SVN, 13.0.2
>         Environment: Linux (both ubuntu and centos).  
>            Reporter: jeffrey putnam
>            Assignee: Richard Mudgett
>      Target Release: 13.3.0, 14.0.0
>
>
> Sending the following request to asterisk via ari causes asterisk to crash.
> {noformat}
> def do_one_call(call_to='SIP/666', sleeptime=10) :
>     channel_base= str(uuid4())
>     params = {
>                 'endpoint' : "SIP/666",
>                 'channelId' : channel_base,
>                 'extension' : '200',
>                 'priority' : '1',
>                 'context' : 'testphone', # this exists 
>              }
>     vars = {
>              "variables" : {
>                    "digits" : "1217",
>                    "code" : "3567",
>                    "language" : "en-US",
>                    "foo" : 1,
>            } }
>     headers = {"content-type" : "application/json" }
>     request = post(url, params=params, data=json.dumps(vars), auth=auth, headers=headers)
> do_one_call()
> {noformat}
> I have a properly registered and running sip phone at 666.  
> Extensions.conf context testphone has this at extension 200 : 
> {noformat}
> exten => 200,1,NoOp(testphone 200)
>  same =>     n,Answer()
>  same =>     n,Playback(silence/4)
>  same =>     n,Hangup()
>  same =>     n,NoOp(testphone 200 done)
> {noformat}
> Changing the value of "foo" above to "1" and everthing works.   gdb on the core dump shows asterisk failing at config.c:290 in trying to evalue strlen of a null value.   
> Workaround - make sure all parameters in json payload are passed in as strings.   



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list