Summary: | ASTERISK-18852: mxml puts quotes inside multiline opaque data | ||
Reporter: | Walter Doekes (wdoekes) | Labels: | |
Date Opened: | 2011-11-10 14:59:10.000-0600 | Date Closed: | 2011-11-11 15:30:15.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/ManagerInterface |
Versions: | 1.8.8.0 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ( 0) issueA18852-manager_bad_multiline_opaque_data.patch | |
Description: | AJAM manager puts garbage single quotes in opaque_data (Opaque-Data). Expected: {noformat} $ cookie="`wget -O- 'http://127.0.0.1:8088/mxml?Action=Login&username=mark&secret=secret' --save-headers 2>/dev/null | grep Set-Cookie | sed -e 's/Set-//'`" ; wget -qO- 'http://127.0.0.1:8088/mxml?Action=Command&Command=core%20show%20channels' --header "$cookie" <ajax-response> <response type='object' id='unknown'><generic response='Follows' privilege='Command' opaque_data='Channel Location State Application(Data) 0 active channels 0 active calls 0 calls processed --END COMMAND--' /></response> </ajax-response> {noformat} Got: {noformat} $ cookie="`wget -O- 'http://127.0.0.1:8088/mxml?Action=Login&username=mark&secret=secret' --save-headers 2>/dev/null | grep Set-Cookie | sed -e 's/Set-//'`" ; wget -qO- 'http://127.0.0.1:8088/mxml?Action=Command&Command=core%20show%20channels' --header "$cookie" <ajax-response> <response type='object' id='unknown'><generic response='Follows' privilege='Command' opaque_data='Channel Location State Application(Data)'0 active channels 0 active calls 0 calls processed --END COMMAND-- ' /></response> </ajax-response> {noformat} Observe the early single quote in the opaque data and the linefeed that's unnecessary at the end but is missing after line 1. Attached patch should fix it. Bug found by: peep_ on IRC Regards, Walter Doekes OSSO B.V. | ||
Comments: |