[SR-Users] check_from and check_to: case sensitive?

Klaus Darilion klaus.mailinglists at pernau.at
Tue Jun 1 18:54:16 CEST 2010



Am 01.06.2010 18:10, schrieb Iñaki Baz Castillo:
> 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()?

Probably it should.

regards
Klaus

btw: how is "if ($au!=$tU)" compared?



More information about the sr-users mailing list