<p>Alexei Gradinari has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18640">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_pubsub: XML sanitized RLS display name<br><br>ASTERISK-29891<br><br>Change-Id: Ic8c9697e616446e06e6302653eae902aa23372ad<br>---<br>M res/res_pjsip_pubsub.c<br>1 file changed, 3 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/40/18640/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c</span><br><span>index 5cccdcc..a0fe273 100644</span><br><span>--- a/res/res_pjsip_pubsub.c</span><br><span>+++ b/res/res_pjsip_pubsub.c</span><br><span>@@ -2070,6 +2070,7 @@</span><br><span>         pj_xml_attr *cid_attr;</span><br><span>       char id[6];</span><br><span>  char uri[PJSIP_MAX_URL_SIZE];</span><br><span style="color: hsl(120, 100%, 40%);">+ char name_sanitized[PJSIP_MAX_URL_SIZE];</span><br><span> </span><br><span>         /* This creates a string representing the Content-ID without the enclosing < > */</span><br><span>      const pj_str_t cid_stripped = {</span><br><span>@@ -2084,7 +2085,8 @@</span><br><span>      pjsip_uri_print(PJSIP_URI_IN_CONTACT_HDR, resource_uri, uri, sizeof(uri));</span><br><span>   ast_sip_presence_xml_create_attr(pool, resource, "uri", uri);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-     pj_strdup2(pool, &name->content, resource_name);</span><br><span style="color: hsl(120, 100%, 40%);">+       ast_sip_sanitize_xml(resource_name, name_sanitized, sizeof(name_sanitized));</span><br><span style="color: hsl(120, 100%, 40%);">+  pj_strdup2(pool, &name->content, name_sanitized);</span><br><span> </span><br><span>         ast_generate_random_string(id, sizeof(id));</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18640">change 18640</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/18640"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 19 </div>
<div style="display:none"> Gerrit-Change-Id: Ic8c9697e616446e06e6302653eae902aa23372ad </div>
<div style="display:none"> Gerrit-Change-Number: 18640 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexei Gradinari <alex2grad@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>