[SR-Users] check_from and check_to: case sensitive?
Iñaki Baz Castillo
ibc at aliax.net
Tue Jun 1 18:10:24 CEST 2010
2010/6/1 Iñaki Baz Castillo <ibc at aliax.net>:
> Hi, when using check_from or check_to, is the username part of the uri
> checked in mode case sensitive or insensitive?
> It should be case sensitive as per SIP grammar. But in the code
> (uri_db/checks.c) I see the opposite:
>
> /* URI table not used, simply compare digest username and From/To
> * username, the comparison is case insensitive
> */
> if (_uri->user.len == c->digest.username.user.len) {
> if (!strncasecmp(_uri->user.s,
> c->digest.username.user.s,
> _uri->user.len)) {
> LM_DBG("Digest username and URI
> username match\n");
> return 1;
> }
> }
Shouldn't it use strncmp()?
--
Iñaki Baz Castillo
<ibc at aliax.net>
More information about the sr-users
mailing list