[Kamailio-Devel] [ openser-Bugs-2047019 ] URI userinfo is case **sensitive**

SourceForge.net noreply at sourceforge.net
Tue Aug 12 09:40:23 CEST 2008


Bugs item #2047019, was opened at 2008-08-12 00:59
Message generated for change (Comment added) made by miconda
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2047019&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: ver devel
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Iaki Baz (ibc_sf)
Assigned to: Nobody/Anonymous (nobody)
Summary: URI userinfo is case **sensitive**

Initial Comment:
Hi, Kamailio matches the following when RURI="sip:aa at domain.com":

  if ($rU == "Aa")  => returns true

But this is not valid since userinfo part of an URI is case *sensitive* (but not the protocol, domain, uri parameters and header parameters):

--------------
19.1.4 URI Comparison

      o  Comparison of the userinfo of SIP and SIPS URIs is case-
         sensitive.  This includes userinfo containing passwords or
         formatted as telephone-subscribers.  Comparison of all other
         components of the URI is case-insensitive unless explicitly
         defined otherwise.
--------------


Also, URI parameters matching in Kamailio is wrong since it compares all the parameters in URI A with all parameters in URI B. For example, Kamamilio says those two URI's are not equal when in fact they are:

  URI A = sip:aa at domain;kk
  URI A = sip:aa at domain;qq

--------------
      o  URI uri-parameter components are compared as follows:

         -  Any uri-parameter appearing in both URIs must match.

         -  A user, ttl, or method uri-parameter appearing in only one
            URI never matches, even if it contains the default value.

         -  A URI that includes an maddr parameter will not match a URI
            that contains no maddr parameter.

         -  All other uri-parameters appearing in only one URI are
            ignored when comparing the URIs.
--------------

Well, I think this is a pain, but near 60% in SIP is a pain XD

----------------------------------------------------------------------

>Comment By: Daniel-Constantin Mierla (miconda)
Date: 2008-08-12 10:40

Message:
Logged In: YES 
user_id=1246013
Originator: NO

The string operations in script are case insensitive. avp_check() can do
case sensitive comparisons.

As operations flexibility give configuration file power, we would need a
new set of operators to differentiate between case sensitive and
insensitive. Alternative is to introduce function in core like
strcmp/strcasecmp.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2047019&group_id=139143



More information about the Devel mailing list