]> git.ipfire.org Git - thirdparty/freeswitch.git/commit
[mod_sofia] Fix PRESENCE_PROBE firing on rejection 1777/head
authoragree <ahrongreenberg@gmail.com>
Fri, 26 Aug 2022 21:48:31 +0000 (17:48 -0400)
committeragree <ahrongreenberg@gmail.com>
Fri, 26 Aug 2022 22:09:34 +0000 (18:09 -0400)
commit767b163cbdaf101d4715e01fc68d3ed3022cfed3
tree403c3ed8a8a321f529ba37ba5d59e04355ead7c0
parent56fc9953251497a68892cce41df7f1927cb916c4
[mod_sofia] Fix PRESENCE_PROBE firing on rejection

After rejecting the subscription for authentication the function calls goto end. In the end block freeswitch fires PRESENCE_PROBE events and releases the allocated memory
* when rejecting a call for auth PRESENCE_PROBE should not get fired
* This caused all other subscribers to the same entity to get flooded with NOTIFY's because `call_id` only gets set later in the function, so when firing the PRESENCE_PROBE without `call_id` being set all subscriptions will get a notify
* this can be considered a security flaw as any unauthorized user can send
SUBSCRIBES and trigger thousands of NOTIFY's to the SUBSCRIBED endpoints

This was fixed simply my moving down the end label after the code that
sends the PRESENCE_PROBE event
src/mod/endpoints/mod_sofia/sofia_presence.c