Changeset 4288


Ignore:
Timestamp:
Oct 26, 2012 9:30:37 AM (11 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

Location:
pjproject/trunk/pjsip
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r4262 r4288  
    27302730    /**  
    27312731     * The full SIP URL for the account. The value can take name address or  
    2732      * URL format, and will look something like "sip:account@serviceprovider". 
     2732     * URL format, and will look something like "sip:account@serviceprovider" 
     2733     * or "\"Display Name\" <sip:account@provider>". 
    27332734     * 
    27342735     * This field is mandatory. 
     
    45354536 * 
    45364537 * @param call_id       The call id to be transfered. 
    4537  * @param dest          Address of new target to be contacted. 
     4538 * @param dest          URI of new target to be contacted. The URI may be 
     4539 *                      in name address or addr-spec format. 
    45384540 * @param msg_data      Optional message components to be sent with 
    45394541 *                      the request. 
  • 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.