[OpenSIPS-Users] sipmsg_validate not detecting wrong user agent

Bogdan-Andrei Iancu bogdan at opensips.org
Sat Jan 4 09:34:41 EST 2020


Hi Sharad,

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.

Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
OpenSIPS Summit, Amsterdam, May 2020
   https://www.opensips.org/events/Summit-2020Amsterdam/
OpenSIPS Bootcamp, Miami, March 2020
   https://opensips.org/training/OpenSIPS_Bootcamp_2020/

On 12/31/19 1:21 AM, Sharad Kumar via Users wrote:
> Hi guys,
>
> We are using openSIPS for edge proxy and one of our client is sending 
> wrong user-agent which is not compliant with RFC.
> This is the username which is being passed -
> Asterisk PBX 1.8.23.0-1_centos5.go RPM by demian at goautodial.com 
> <mailto:demian at goautodial.com>\r\n
>
> 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.
> if (!sipmsg_validate("shrftc")){
>   send_reply("400","Bad request/body");
>   exit;
> }
>
> Thank you
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200104/347d61ba/attachment.html>


More information about the Users mailing list