Module: kamailio Branch: master Commit: 2ff43e95985b9a964d884281ddb159959e6c6992 URL: https://github.com/kamailio/kamailio/commit/2ff43e95985b9a964d884281ddb159959e6c6992
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2025-07-31T14:43:35+02:00 presence: dmq - safety check for duplicated presentity or subscription --- Modified: src/modules/presence/presence_dmq.c --- Diff: https://github.com/kamailio/kamailio/commit/2ff43e95985b9a964d884281ddb159959e6c6992.diff Patch: https://github.com/kamailio/kamailio/commit/2ff43e95985b9a964d884281ddb159959e6c6992.patch --- diff --git a/src/modules/presence/presence_dmq.c b/src/modules/presence/presence_dmq.c index 48d95bea6ed..b973fab6d45 100644 --- a/src/modules/presence/presence_dmq.c +++ b/src/modules/presence/presence_dmq.c @@ -393,12 +393,18 @@ int pres_dmq_handle_msg( if(strcmp(it->string, "action") == 0) { action = SRJSON_GET_INT(it); } else if(strcmp(it->string, "presentity") == 0) { + if(presentity != NULL) { + goto invalid; + } presentity = pres_parse_json_presentity(it); if(!presentity) { LM_ERR("failed to construct presentity from json\n"); goto invalid; } } else if(strcmp(it->string, "subscription") == 0) { + if(subscription != NULL) { + goto invalid; + } subscription = pres_parse_json_subscription(it); if(!subscription) { LM_ERR("failed to construct subscription from json\n"); _______________________________________________ Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org To unsubscribe send an email to sr-dev-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!