[SR-Users] sanity passes invalid uri
Daniel-Constantin Mierla
miconda at gmail.com
Mon Oct 30 10:33:37 CET 2017
Hello,
On 27.10.17 16:23, Juha Heinanen wrote:
> I noticed that K 5.0 sanity() test passes uri that contains ` (back quote)
> character.
>
> Config:
>
> modparam("sanity", "default_checks", 1024) /* URI checks */
> modparam("sanity", "uri_checks", 3) /* RURI, From */
>
> xlog("L_INFO", "Checking $ru\n");
> if (!sanity_check())
> xlog("L_INFO", "Check failed\n");
> else
> xlog("L_INFO", "Check passed\n");
>
> Syslog:
>
> Oct 27 17:17:38 lohi /usr/bin/sip-proxy[31946]: INFO: Checking sip:jh at te`st.fi
> Oct 27 17:17:38 lohi /usr/bin/sip-proxy[31946]: INFO: Check passed
>
> According to RFC3261:
>
> hostname = *( domainlabel "." ) toplabel [ "." ]
> domainlabel = alphanum
> / alphanum *( alphanum / "-" ) alphanum
>
> Is this a bug or am I missing something?
>
I don't remember any change recently to sanity, so probably it was
developed like this for long time. You can go ahead and fix it in the
code. As a quick fix, you can add an extra regexp condition in the config.
Cheers,
Daniel
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
Kamailio World Conference - www.kamailioworld.com
More information about the sr-users
mailing list