res_pjsip_pidf_body_generator / res_pjsip_xpidf_body_generator: Ensure local entity is unquoted.

The local entity as provided by PJSIP is quoted within '<' and '>'. As a result placing
this value into XML will result in malformed XML being produced. This patch now unquotes
the local entity so it can go safely into the XML.

Review: https://reviewboard.asterisk.org/r/3851/
........

Merged revisions 419750 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2014-07-29 09:54:24 +00:00
parent 2758cc76e5
commit e28f8936d3
2 changed files with 4 additions and 2 deletions

View File

@@ -39,10 +39,11 @@
static void *xpidf_allocate_body(void *data)
{
struct ast_sip_exten_state_data *state_data = data;
char *local = ast_strdupa(state_data->local);
pjxpidf_pres *pres;
pj_str_t name;
pres = pjxpidf_create(state_data->pool, pj_cstr(&name, state_data->local));
pres = pjxpidf_create(state_data->pool, pj_cstr(&name, ast_strip_quoted(local, "<", ">")));
return pres;
}