[asterisk-bugs] [JIRA] (ASTERISK-25662) Malformed AGI 520 Usage response

Tony Mountifield (JIRA) noreply at issues.asterisk.org
Wed Jan 6 08:23:33 CST 2016


Tony Mountifield created ASTERISK-25662:
-------------------------------------------

             Summary: 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: 13.6.0, 11.21.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