Module: kamailio
Branch: master
Commit: 4598f0a0df90ad81e192be55a89fbd5cca52a40e
URL:
https://github.com/kamailio/kamailio/commit/4598f0a0df90ad81e192be55a89fbd5…
Author: korayvt <koray.vatansever(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-08-23T14:05:19+02:00
core: added parser mode check
---
Modified: src/core/parser/msg_parser.c
---
Diff:
https://github.com/kamailio/kamailio/commit/4598f0a0df90ad81e192be55a89fbd5…
Patch:
https://github.com/kamailio/kamailio/commit/4598f0a0df90ad81e192be55a89fbd5…
---
diff --git a/src/core/parser/msg_parser.c b/src/core/parser/msg_parser.c
index 6455c9e5393..7a3855531ed 100644
--- a/src/core/parser/msg_parser.c
+++ b/src/core/parser/msg_parser.c
@@ -623,9 +623,11 @@ int parse_headers(struct sip_msg* const msg, const hdr_flags_t flags,
const int
skip:
msg->unparsed=tmp;
- if(msg->headers==NULL) {
- /* nothing parsed - invalid input sip message */
- goto error1;
+ if(ksr_sip_parser_mode & KSR_SIP_PARSER_MODE_STRICT) {
+ if(msg->headers==NULL) {
+ /* nothing parsed - invalid input sip message */
+ goto error1;
+ }
}
/* restore original flags */
msg->parsed_flag |= orig_flag;