]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip: Validate that contact uris start with sip: or sips: 32/232/4
authorGeorge Joseph <george.joseph@fairview5.com>
Thu, 23 Apr 2015 14:16:45 +0000 (08:16 -0600)
committerGeorge Joseph <george.joseph@fairview5.com>
Thu, 23 Apr 2015 16:51:29 +0000 (10:51 -0600)
commitf70d21b2cf15e9b84beb1f495362cd896c520a9b
treee30be2bad29a3d292ca3f8fbee95ef52c85bcb88
parenta06924e9d960222df5a6862f7a03c45724386ce8
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
res/res_pjsip.c
res/res_pjsip/location.c