Changeset 3149


Ignore:
Timestamp:
Apr 29, 2010 12:03:19 AM (10 years ago)
Author:
bennylp
Message:

Fixed #1061 (Assertion when receiving authentication challenge with empty realm (thanks Andrey Kovalenko for the report)):

  • removed the assertion (allow responding to empty realm)
  • slight modification in Authenticate/WWW-Authenticate headers to allow printing challenge with empty realm, otherwise a malformed header will be printed if empty realm is given
Location:
pjproject/trunk/pjsip/src/pjsip
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_auth_client.c

    r3148 r3149  
    394394 
    395395        /* Save realm. */ 
     396        /* Note: allow empty realm (http://trac.pjsip.org/repos/ticket/1061) 
    396397        pj_assert(cached_auth->realm.slen != 0); 
     398        */ 
    397399        if (cached_auth->realm.slen == 0) { 
    398400            pj_strdup(ses_pool, &cached_auth->realm,  
  • pjproject/trunk/pjsip/src/pjsip/sip_auth_msg.c

    r2394 r3149  
    233233    const pjsip_parser_const_t *pc = pjsip_parser_const(); 
    234234 
    235     copy_advance_pair_quote_cond(buf, " realm=", 7, chal->realm, '"', '"'); 
     235    /* Allow empty realm, see http://trac.pjsip.org/repos/ticket/1061 */ 
     236    copy_advance_pair_quote(buf, " realm=", 7, chal->realm, '"', '"'); 
    236237    copy_advance_pair_quote_cond(buf, ",domain=", 8, chal->domain, '"', '"'); 
    237238    copy_advance_pair_quote_cond(buf, ",nonce=", 7, chal->nonce, '"', '"'); 
Note: See TracChangeset for help on using the changeset viewer.