Summary: | ASTERISK-25662: Malformed AGI 520 Usage response | ||
Reporter: | Tony Mountifield (softins) | Labels: | |
Date Opened: | 2016-01-06 08:21:51.000-0600 | Date Closed: | 2017-05-25 15:24:48 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Resources/res_agi |
Versions: | 11.21.0 13.6.0 | Frequency of Occurrence | Constant |
Related Issues: | |||
Environment: | Attachments: | ||
Description: | 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. | ||
Comments: | By: Asterisk Team (asteriskteam) 2016-01-06 08:21:52.836-0600 Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report. Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process]. By: Rusty Newton (rnewton) 2016-01-06 16:30:07.927-0600 Thanks for the report! If you want to help us get this in even faster - please check out the [Patch Contribution process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process] and even [~mjordan] 's [new blog article|https://www.asterisk-blog.com/2016/01/04/how-to-contribute-to-asterisk-part-one/] By: Friendly Automation (friendly-automation) 2017-05-25 15:24:49.796-0500 Change 5699 merged by Jenkins2: res_agi: Fix malformed AGI usage response [https://gerrit.asterisk.org/5699|https://gerrit.asterisk.org/5699] By: Friendly Automation (friendly-automation) 2017-05-26 08:02:19.468-0500 Change 5697 merged by Jenkins2: res_agi: Fix malformed AGI usage response [https://gerrit.asterisk.org/5697|https://gerrit.asterisk.org/5697] By: Friendly Automation (friendly-automation) 2017-05-26 08:24:08.209-0500 Change 5698 merged by George Joseph: res_agi: Fix malformed AGI usage response [https://gerrit.asterisk.org/5698|https://gerrit.asterisk.org/5698] |