[SR-Users] sanity from uri check

Juha Heinanen jh at tutpro.com
Mon Mar 14 07:47:29 CET 2022


I have in config:

modparam("sanity", "uri_checks", 3)  /* RURI, From */

and then config call sanity_check() on incoming requests:

if (!sanity_check()) {
      xnotice("Request from <$var(src_ip)> has invalid syntax\n");
      exit;
    };

When incoming request has:

From: sipp <sip:@192.168.255.95:5062>;tag=1

no notice is printed to syslog.

>From RFC 3261:

SIP-URI          =  "sip:" [ userinfo ] hostport uri-parameters [ headers ]
userinfo         =  ( user / telephone-subscriber ) [ ":" password ] "@"
user             =  1*( unreserved / escaped / user-unreserved )

My understanding of that is that there needs to be at least one
character before @ sign.

-- Juha



More information about the sr-users mailing list