<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Sharad,<br>
      <br>
      The sipmsg_validate() function does not perform any checks on the
      content of the User-Agent hdr - it only checks if the hdr has a
      non-empty body.<br>
      <br>
      Best regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS Summit, Amsterdam, May 2020
  <a class="moz-txt-link-freetext" href="https://www.opensips.org/events/Summit-2020Amsterdam/">https://www.opensips.org/events/Summit-2020Amsterdam/</a>
OpenSIPS Bootcamp, Miami, March 2020
  <a class="moz-txt-link-freetext" href="https://opensips.org/training/OpenSIPS_Bootcamp_2020/">https://opensips.org/training/OpenSIPS_Bootcamp_2020/</a>

</pre>
    <div class="moz-cite-prefix">On 12/31/19 1:21 AM, Sharad Kumar via
      Users wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:d8WxLkP8DOljq0zZYXcqshL4WsWJwdMDpJ1MRlOqqAKxapAba1rW36cd3JfeJ3pCjEa22FSfi9FJ3yMGWwFooNS-AtaysSxeZpyPf2TDh50=@protonmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div>Hi guys, <br>
      </div>
      <div><br>
      </div>
      <div>We are using openSIPS for edge proxy and one of our client is
        sending wrong user-agent which is not compliant with RFC. <br>
      </div>
      <div>This is the username which is being passed - <br>
      </div>
      <div><span data-story-id="story_c90e9ed8e55306bc32eb6ac0c4452ad2"
          data-room-id="room_967425189658b0b49c30114133283974"
          data-timestamp="1577729703633" data-text="Asterisk PBX
          1.8.23.0-1_centos5.go RPM by demian@goautodial.com\r\n""
          data-userid="424128934191677440"
          data-orgid="425206369688383488">Asterisk PBX
          1.8.23.0-1_centos5.go RPM by <a
            href="mailto:demian@goautodial.com" moz-do-not-send="true">demian@goautodial.com</a>\r\n
        </span><br>
      </div>
      <div><br>
      </div>
      <div><span data-story-id="story_c90e9ed8e55306bc32eb6ac0c4452ad2"
          data-room-id="room_967425189658b0b49c30114133283974"
          data-timestamp="1577729703633" data-text="Asterisk PBX
          1.8.23.0-1_centos5.go RPM by demian@goautodial.com\r\n""
          data-userid="424128934191677440"
          data-orgid="425206369688383488">Where @ is not allowed in
          user-agent header. We are using this function in openSIPS to
          validate SIP headers but this function not seems to be working
          and not rejecting that INVITE.</span><br>
      </div>
      <div>if (!sipmsg_validate("shrftc")){<br>
      </div>
      <div>  send_reply("400","Bad request/body");<br>
      </div>
      <div>  exit;<br>
      </div>
      <div>}<br>
      </div>
      <div><br>
      </div>
      <div>Thank you<br>
      </div>
      <div><span data-story-id="story_c90e9ed8e55306bc32eb6ac0c4452ad2"
          data-room-id="room_967425189658b0b49c30114133283974"
          data-timestamp="1577729703633" data-text="Asterisk PBX
          1.8.23.0-1_centos5.go RPM by demian@goautodial.com\r\n""
          data-userid="424128934191677440"
          data-orgid="425206369688383488"></span><br>
      </div>
      <div class="protonmail_signature_block
        protonmail_signature_block-empty">
        <div class="protonmail_signature_block-user
          protonmail_signature_block-empty"><br>
        </div>
        <div class="protonmail_signature_block-proton
          protonmail_signature_block-empty"><br>
        </div>
      </div>
      <div><br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>