]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip: Validate that contact uris start with sip: or sips: 32/1232/1
authorGeorge Joseph <george.joseph@fairview5.com>
Thu, 23 Apr 2015 14:16:45 +0000 (08:16 -0600)
committerMark Michelson <mmichelson@digium.com>
Thu, 10 Sep 2015 13:24:57 +0000 (08:24 -0500)
commit943d5c0c996d92e187c4576a5919819d2c62a79a
tree419c383d95943cd586aec88af10d62888ee2cf35
parent7b5bcbeebee0f41c3a0d195891d109d152fcb19e
res_pjsip:  Validate that contact uris start with sip: or sips:

Currently we use pjsip_parse_hdr to validate contact uris but it
appears that it allows uris without a scheme if there's a port
supplied.  I.E myexample.com will fail but myexample.com:5060 will
pass even though it has no scheme.  This causes SEGVs later on
whenever the uri is used.

To prevent this, permanent_contact_validate has been updated to check
that the scheme is either 'sip' or 'sips'.

2 uses of possibly-null endpoint have also been fixed in
create_out_of_dialog_request.

ASTERISK-24999

Change-Id: Ifc17d16a4923e1045d37fe51e43bbe29fa556ca2
Reported-by: Brad Latus
(cherry picked from commit 75666ad7c608ad9968a216a8f0a5832bf85b785c)
res/res_pjsip.c
res/res_pjsip/location.c