[asterisk-bugs] [JIRA] (ASTERISK-25662) Malformed AGI 520 Usage response
Friendly Automation (JIRA)
noreply at issues.asterisk.org
Thu May 25 15:25:58 CDT 2017
[ https://issues.asterisk.org/jira/browse/ASTERISK-25662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=237170#comment-237170 ]
Friendly Automation commented on ASTERISK-25662:
------------------------------------------------
Change 5699 merged by Jenkins2:
res_agi: Fix malformed AGI usage response
[https://gerrit.asterisk.org/5699|https://gerrit.asterisk.org/5699]
> Malformed AGI 520 Usage response
> --------------------------------
>
> Key: ASTERISK-25662
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-25662
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Resources/res_agi
> Affects Versions: 11.21.0, 13.6.0
> Reporter: Tony Mountifield
> Severity: Minor
>
> In res_agi.c, there are the following three lines:
> {code}
> ast_agi_send(agi->fd, chan, "520-Invalid command syntax. Proper usage follows:\n");
> ast_agi_send(agi->fd, chan, "%s", c->usage);
> ast_agi_send(agi->fd, chan, "520 End of proper usage.\n");
> {code}
> However, the value of {{c->usage}} generated from the XML appears to lack a terminating newline. This means that the {{520 End of proper usage.}} will not appear at the beginning of a line and this will therefore confuse a parser of AGI responses.
> Suggest the middle line be changed as follows:
> {code}
> ast_agi_send(agi->fd, chan, "%s\n", c->usage);
> {code}
> This bug has probably existed ever since the original change to XML help. Obviously, it only occurs when an AGI client sends a malformed command.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list