Discussion:
[sr-dev] git:master:c264fbc6: pv: test for HDR_ERROR_T after header name parsing
Daniel-Constantin Mierla
2021-06-04 07:08:39 UTC
Permalink
Content preview: Module: kamailio Branch: master Commit: c264fbc66a4690b073c72ffa8fc095227ce0ae8b
URL: https://github.com/kamailio/kamailio/commit/c264fbc66a4690b073c72ffa8fc095227ce0ae8b
Author: Daniel-Constantin Mierla <***@gmail.com> Committer: Daniel-Constantin
Mierla <***@gmail.com> Date: 2021-06-03T15:29:50+02:00

Content analysis details: (-2.4 points, 5.5 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is
CUSTOM_MED
0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
mail domains are different
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider (miconda[at]gmail.com)
1.0 FORGED_GMAIL_RCVD 'From' gmail.com does not match 'Received'
headers
0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and
EnvelopeFrom freemail headers are
different
-1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list
manager

Module: kamailio
Branch: master
Commit: c264fbc66a4690b073c72ffa8fc095227ce0ae8b
URL: https://github.com/kamailio/kamailio/commit/c264fbc66a4690b073c72ffa8fc095227ce0ae8b

Author: Daniel-Constantin Mierla <***@gmail.com>
Committer: Daniel-Constantin Mierla <***@gmail.com>
Date: 2021-06-03T15:29:50+02:00

pv: test for HDR_ERROR_T after header name parsing

---

Modified: src/modules/pv/pv_core.c

---

Diff: https://github.com/kamailio/kamailio/commit/c264fbc66a4690b073c72ffa8fc095227ce0ae8b.diff
Patch: https://github.com/kamailio/kamailio/commit/c264fbc66a4690b073c72ffa8fc095227ce0ae8b.patch

---

diff --git a/src/modules/pv/pv_core.c b/src/modules/pv/pv_core.c
index 8f398cdf43..5b011ea248 100644
--- a/src/modules/pv/pv_core.c
+++ b/src/modules/pv/pv_core.c
@@ -3501,8 +3501,8 @@ int pv_parse_hdr_name(pv_spec_p sp, str *in)
s.s = p;
s.len = in->len+1;

- if (parse_hname2_short(s.s, s.s + s.len, &hdr)==0)
- {
+ parse_hname2_short(s.s, s.s + s.len, &hdr);
+ if(hdr.type==HDR_ERROR_T) {
LM_ERR("error parsing header name [%.*s]\n", s.len, s.s);
goto error;
}

Loading...