[asterisk-bugs] [JIRA] (ASTERISK-27290) PIDF contact field has malformed XML

Ingo Bauersachs (JIRA) noreply at issues.asterisk.org
Tue Oct 3 16:00:08 CDT 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=238961#comment-238961 ] 

Ingo Bauersachs commented on ASTERISK-27290:
--------------------------------------------

If I may chime in here. This issue was originally reported in as [Jitsi issue 388|https://github.com/jitsi/jitsi/issues/388]. The content of the contact element in the posted example is invalid since it contains more than a URL:
{quote}
The <contact> element contains a URL of the contact address
{quote}
[RFC3863#4.1.5|https://tools.ietf.org/html/rfc3863#section-4.1.5]. See also all the examples of {{<contact/>}} elements in the RFC.

The unit tests I found in [Gerrit|https://gerrit.asterisk.org/#/c/1023/4/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_pidf/test-config.yaml] explicitly check that stuff like {{"alice" <sip:alice at 127.0.0.1>}} is okay. Which is wrong, it's invalid.

In {{res_pjsip_pidf_body_generator::pidf_generate_body_content}}, the contact content is taken from {{ast_sip_exten_state_data.remote}}. The value of {{remote}} is set by {{ast_sip_subscription_get_remote_uri}} and taken from {{pjsip_dialog->remote.info_str}} while I think this should be {{pjsip_dialog->remote.contact.uri}}.

HTH

> PIDF contact field has malformed XML
> ------------------------------------
>
>                 Key: ASTERISK-27290
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27290
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>    Affects Versions: 14.6.1
>         Environment: FreePBX distro 14.
>            Reporter: basildane
>            Assignee: Unassigned
>            Severity: Minor
>         Attachments: pjsip.conf
>
>
> Starting in Asterisk 14, the notify pidf presence *contact* field has malformed xml.  The field contains "&quot", "&lt", and "&gt" where the actual characters should be.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list