Bugs item #2897594, was opened at 2009-11-14 09:14
Message generated for change (Comment added) made by miconda
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2897594&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: modules
Group: ver devel
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Mangust (mangust2)
>Assigned to: Daniel-Constantin Mierla (miconda)
Summary: uac_auth does't work in 3.0

Initial Comment:
in file modules_k/uac/auth.c

line 235:

        for( hdr=rpl->headers ; hdr ; hdr=hdr->next )
        {
// -->>             if ( hdr->type!=HDR_OTHER_T)
// -->>                     continue;
                if (cmp_hdrname_str(&hdr->name, &hdr_name)==0)
                        return hdr;
        }

commented out line prevent from recognizing authentication field causing error.
Nov 14 04:02:28 v /usr/local/sbin/kamailio[24361]: ERROR: uac [auth.c:244]: 
reply has no auth hdr (WWW-Authenticate)
Nov 14 04:02:28 v /usr/local/sbin/kamailio[24361]: ERROR: uac [auth.c:419]: 
failed to extract authenticate hdr


maybe because authentication now not HDR_OTHER_T but 
        HDR_WWW_AUTHENTICATE_T                 /* WWW-Authenticate header field 
*/,
        HDR_PROXY_AUTHENTICATE_T               /* Proxy-Authenticate header 
field */,
according to:
http://www.asipto.com/pub/kamailio-devel-guide/

for a moment i just comment it out
will also try:
                if ( hdr->type!=HDR_WWW_AUTHENTICATE_T && 
hdr->type!=HDR_PROXY_AUTHENTICATE_T )
                        continue;
                if (cmp_hdrname_str(&hdr->name, &hdr_name)==0)
                        return hdr;


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

>Comment By: Daniel-Constantin Mierla (miconda)
Date: 2009-11-16 14:21

Message:
OK. Thanks for testing!

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

Comment By: Nobody/Anonymous (nobody)
Date: 2009-11-16 14:13

Message:
I seen changes was made in code on GIT. I approve that authentication now
works. 

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

Comment By: Daniel-Constantin Mierla (miconda)
Date: 2009-11-15 06:18

Message:
Your patch seems ok, I will double check and fix. Thanks!

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

Comment By: Mangust (mangust2)
Date: 2009-11-14 09:26

Message:
A! it happen because before in v1.5 ./parser/hf.h
/**
 * SIP Header types.
 * if you add a new type:
 *  - make sure it's not greater than 63
 *  - make sure you add the corresponding flag to the hdr_flags_t defs
below
 *  - update clean_hdr_field (in hf.c)
 *  - update sip_msg_cloner (modules/tm/sip_msg.c)
 *  - update parse_headers (msg_parser.c)
 */

enum _hdr_types_t {
        HDR_ERROR_T                                     = -1   /**< Error while 
parsing */,
        HDR_OTHER_T                                     =  0   /**< Some other 
header field */,
        HDR_VIA_T                                       =  1   /**< Via header 
field */,
        HDR_VIA1_T                                      =  1   /**< First Via 
header field */,
        HDR_VIA2_T                                      =  2   /**< only used 
as flag */,
        HDR_TO_T                                               /**< To header 
field */,
        HDR_FROM_T                                             /**< From header 
field */,
        HDR_CSEQ_T                                             /**< CSeq header 
field */,
        HDR_CALLID_T                                   /**< Call-Id header 
field */,
        HDR_CONTACT_T                                  /**< Contact header 
field */,
        HDR_MAXFORWARDS_T                              /**< MaxForwards header 
field */,
        HDR_ROUTE_T                                            /**< Route 
header field */,
        HDR_RECORDROUTE_T                              /**< Record-Route header 
field */,
        HDR_PATH_T                                         /**< Path header 
fiels */,
        HDR_CONTENTTYPE_T                              /**< Content-Type header 
field */,
        HDR_CONTENTLENGTH_T                            /**< Content-Length 
header field */,
        HDR_AUTHORIZATION_T                            /**< Authorization 
header field */,
        HDR_EXPIRES_T                                  /**< Expires header 
field */,
        HDR_PROXYAUTH_T                                /**< Proxy-Authorization 
hdr field */,
        HDR_SUPPORTED_T                                /**< Supported  header 
field */,
        HDR_PROXYREQUIRE_T                             /**< Proxy-Require 
header field */,
        HDR_UNSUPPORTED_T                              /**< Unsupported header 
field */,
        HDR_ALLOW_T                                            /**< Allow 
header field */,
        HDR_EVENT_T                                            /**< Event 
header field */,
        HDR_ACCEPT_T                                   /**< Accept header field 
*/,
        HDR_ACCEPTLANGUAGE_T                   /**< Accept-Language header 
field */,
        HDR_ORGANIZATION_T                             /**< Organization header 
field */,
        HDR_PRIORITY_T                                 /**< Priority header 
field */,
        HDR_SUBJECT_T                                  /**< Subject header 
field */,
        HDR_USERAGENT_T                                /**< User-Agent header 
field */,
        HDR_ACCEPTDISPOSITION_T                /**< Accept-Disposition hdr 
field */,
        HDR_CONTENTDISPOSITION_T               /**< Content-Disposition hdr 
field */,
        HDR_DIVERSION_T                                /**< Diversion header 
field */,
        HDR_RPID_T                                             /**< 
Remote-Party-ID header field */,
        HDR_REFER_TO_T                                 /**< Refer-To header 
fiels */,
        HDR_SESSION_EXPIRES_T                  /**< Session-Expires header 
field */,
        HDR_MIN_SE_T                                   /**< Min-SE header field 
*/,
        HDR_PPI_T                                              /**< 
P-Preferred-Identity header field */,
        HDR_PAI_T                                              /**< 
P-Asserted-Identity header field */,
        HDR_PRIVACY_T                                  /**< Privacy header 
field */,
        HDR_RETRY_AFTER_T                              /**< Retry-After header 
field */,
        HDR_EOH_T                                              /**< Some other 
header field */
};


Was NO HDR_WWW_AUTHENTICATE_T or HDR_PROXY_AUTHENTICATE_T so authenticate
header was matching HDR_OTHER_T

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

Comment By: Mangust (mangust2)
Date: 2009-11-14 09:20

Message:
yes, this work as well:

for( hdr=rpl->headers ; hdr ; hdr=hdr->next )
{
if ( hdr->type!=HDR_WWW_AUTHENTICATE_T &&
hdr->type!=HDR_PROXY_AUTHENTICATE_T )
continue;
if (cmp_hdrname_str(&hdr->name, &hdr_name)==0)
return hdr;
}


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

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

_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to