Ignore:
Timestamp:
Oct 26, 2012 9:30:37 AM (8 years ago)
Author:
bennylp
Message:

Misc (re #1559): Require name-addr to have the quote if display name is given. Previously an URI like this will be accepted: "301 301" sip:301@host

File:
1 edited

Legend:

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

    r3553 r4288  
    15231523    /* Get the SIP-URL */ 
    15241524    has_bracket = (*scanner->curptr == '<'); 
    1525     if (has_bracket) 
     1525    if (has_bracket) { 
    15261526        pj_scan_get_char(scanner); 
     1527    } else if (name_addr->display.slen) { 
     1528        /* Must have bracket now (2012-10-26). 
     1529         * Allowing (invalid) name-addr to pass URI verification will 
     1530         * cause us to send invalid URI to the wire. 
     1531         */ 
     1532        PJ_THROW( PJSIP_SYN_ERR_EXCEPTION); 
     1533    } 
    15271534    name_addr->uri = int_parse_uri( scanner, pool, PJ_TRUE ); 
    15281535    if (has_bracket) { 
Note: See TracChangeset for help on using the changeset viewer.