Module: kamailio Branch: 5.8 Commit: fddfbdcce2587e9b40f6c2fe77334d3b3b1dbb6c URL: https://github.com/kamailio/kamailio/commit/fddfbdcce2587e9b40f6c2fe77334d3b...
Author: Xenofon Karamanos xk@gilawa.com Committer: Xenofon Karamanos 22965395+xkaraman@users.noreply.github.com Date: 2025-01-29T11:48:26Z
outbound: Fix flow_token_secret bug
- flow_token_secret is of type str and not char* - check the length of the string instead of memory for initialization
(cherry picked from commit 046ba41e431fec7fad0c82a9091ea9e27d9f677d)
---
Modified: src/modules/outbound/outbound_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/fddfbdcce2587e9b40f6c2fe77334d3b... Patch: https://github.com/kamailio/kamailio/commit/fddfbdcce2587e9b40f6c2fe77334d3b...
---
diff --git a/src/modules/outbound/outbound_mod.c b/src/modules/outbound/outbound_mod.c index 687fc5480d7..2e1251e3ad1 100644 --- a/src/modules/outbound/outbound_mod.c +++ b/src/modules/outbound/outbound_mod.c @@ -68,7 +68,7 @@ static cmd_export_t cmds[] = { static param_export_t params[] = { {"force_outbound_flag", PARAM_INT, &ob_force_flag}, {"force_no_outbound_flag", PARAM_INT, &ob_force_no_flag}, - {"flow_token_secret", PARAM_STRING, &flow_token_secret}, + {"flow_token_secret", PARAM_STR, &flow_token_secret}, {0, 0, 0} };
@@ -88,7 +88,7 @@ struct module_exports exports = {
static void mod_init_openssl(void) { - if(flow_token_secret.s) { + if(flow_token_secret.s && flow_token_secret.len > 0) { assert(ob_key.len == SHA_DIGEST_LENGTH); LM_DBG("flow_token_secret mod param set. use persistent ob_key"); #if OPENSSL_VERSION_NUMBER < 0x030000000L