Module: kamailio
Branch: master
Commit: a0d9deb9f852f887bed7c0809f3056b5f75379c8
URL:
https://github.com/kamailio/kamailio/commit/a0d9deb9f852f887bed7c0809f3056b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-11-04T09:55:22+01:00
secsipid: ensure headers are parsed
---
Modified: src/modules/secsipid/secsipid_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a0d9deb9f852f887bed7c0809f3056b…
Patch:
https://github.com/kamailio/kamailio/commit/a0d9deb9f852f887bed7c0809f3056b…
---
diff --git a/src/modules/secsipid/secsipid_mod.c b/src/modules/secsipid/secsipid_mod.c
index 1676c37c9a..fa1b864404 100644
--- a/src/modules/secsipid/secsipid_mod.c
+++ b/src/modules/secsipid/secsipid_mod.c
@@ -225,6 +225,11 @@ static int ki_secsipid_check_identity(sip_msg_t *msg, str *keypath)
str ibody = STR_NULL;
hdr_field_t *hf;
+ if (parse_headers(msg, HDR_EOH_F, 0) == -1) {
+ LM_ERR("error while parsing message\n");
+ return -1;
+ }
+
if(secsipid_cache_dir.len > 0) {
_secsipid_papi.SecSIPIDSetFileCacheOptions(secsipid_cache_dir.s,
secsipid_cache_expire);
@@ -283,6 +288,11 @@ static int ki_secsipid_check_identity_pubkey(sip_msg_t *msg, str
*keyval)
str ibody = STR_NULL;
hdr_field_t *hf;
+ if (parse_headers(msg, HDR_EOH_F, 0) == -1) {
+ LM_ERR("error while parsing message\n");
+ return -1;
+ }
+
if(secsipid_libopt_list_used==0) {
str_list_t *sit;
for(sit=secsipid_libopt_list; sit!=NULL; sit=sit->next) {