Daniel-Constantin Mierla
2021-06-02 16:49:25 UTC
Content preview: Module: kamailio Branch: master Commit: 95034f62d4a0cf536da1c5c26c748c1cf8ccb280
URL: https://github.com/kamailio/kamailio/commit/95034f62d4a0cf536da1c5c26c748c1cf8ccb280
Author: Daniel-Constantin Mierla <***@gmail.com> Committer: Daniel-Constantin
Mierla <***@gmail.com> Date: 2021-06-02T18:48: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.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider (miconda[at]gmail.com)
0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
mail domains are different
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: 95034f62d4a0cf536da1c5c26c748c1cf8ccb280
URL: https://github.com/kamailio/kamailio/commit/95034f62d4a0cf536da1c5c26c748c1cf8ccb280
Author: Daniel-Constantin Mierla <***@gmail.com>
Committer: Daniel-Constantin Mierla <***@gmail.com>
Date: 2021-06-02T18:48:50+02:00
xprint: check hdr type HDR_ERROR_T after parsing
---
Modified: src/modules/xprint/xp_lib.c
---
Diff: https://github.com/kamailio/kamailio/commit/95034f62d4a0cf536da1c5c26c748c1cf8ccb280.diff
Patch: https://github.com/kamailio/kamailio/commit/95034f62d4a0cf536da1c5c26c748c1cf8ccb280.patch
---
diff --git a/src/modules/xprint/xp_lib.c b/src/modules/xprint/xp_lib.c
index b2bcc077b7..4adb5c31c6 100644
--- a/src/modules/xprint/xp_lib.c
+++ b/src/modules/xprint/xp_lib.c
@@ -1481,16 +1481,17 @@ static int _xl_parse_format(char *s, xl_elog_p *el, int shm, xl_parse_cb parse_c
/* ugly hack for compact header names -- !!fake length!!
* -- parse_hname2 expects name buffer length >= 4
*/
- if (parse_hname2(e->hparam.s,
+ parse_hname2(e->hparam.s,
e->hparam.s + ((e->hparam.len<4)?4:e->hparam.len),
- &hdr)==0)
+ &hdr);
+ if(hdr.type==HDR_ERROR_T)
{
- LOG(L_ERR,"xprint: xl_parse_format: strange error\n");
+ LOG(L_ERR,"xprint: xl_parse_format: header parsing error\n");
goto error;
}
e->hparam.len--;
e->hparam.s[e->hparam.len] = c;
- if (hdr.type!=HDR_OTHER_T && hdr.type!=HDR_ERROR_T)
+ if (hdr.type!=HDR_OTHER_T)
{
LOG(L_INFO,"INFO:xprint: xl_parse_format: using "
"hdr type (%d) instead of <%.*s>\n",
URL: https://github.com/kamailio/kamailio/commit/95034f62d4a0cf536da1c5c26c748c1cf8ccb280
Author: Daniel-Constantin Mierla <***@gmail.com> Committer: Daniel-Constantin
Mierla <***@gmail.com> Date: 2021-06-02T18:48: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.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider (miconda[at]gmail.com)
0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
mail domains are different
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: 95034f62d4a0cf536da1c5c26c748c1cf8ccb280
URL: https://github.com/kamailio/kamailio/commit/95034f62d4a0cf536da1c5c26c748c1cf8ccb280
Author: Daniel-Constantin Mierla <***@gmail.com>
Committer: Daniel-Constantin Mierla <***@gmail.com>
Date: 2021-06-02T18:48:50+02:00
xprint: check hdr type HDR_ERROR_T after parsing
---
Modified: src/modules/xprint/xp_lib.c
---
Diff: https://github.com/kamailio/kamailio/commit/95034f62d4a0cf536da1c5c26c748c1cf8ccb280.diff
Patch: https://github.com/kamailio/kamailio/commit/95034f62d4a0cf536da1c5c26c748c1cf8ccb280.patch
---
diff --git a/src/modules/xprint/xp_lib.c b/src/modules/xprint/xp_lib.c
index b2bcc077b7..4adb5c31c6 100644
--- a/src/modules/xprint/xp_lib.c
+++ b/src/modules/xprint/xp_lib.c
@@ -1481,16 +1481,17 @@ static int _xl_parse_format(char *s, xl_elog_p *el, int shm, xl_parse_cb parse_c
/* ugly hack for compact header names -- !!fake length!!
* -- parse_hname2 expects name buffer length >= 4
*/
- if (parse_hname2(e->hparam.s,
+ parse_hname2(e->hparam.s,
e->hparam.s + ((e->hparam.len<4)?4:e->hparam.len),
- &hdr)==0)
+ &hdr);
+ if(hdr.type==HDR_ERROR_T)
{
- LOG(L_ERR,"xprint: xl_parse_format: strange error\n");
+ LOG(L_ERR,"xprint: xl_parse_format: header parsing error\n");
goto error;
}
e->hparam.len--;
e->hparam.s[e->hparam.len] = c;
- if (hdr.type!=HDR_OTHER_T && hdr.type!=HDR_ERROR_T)
+ if (hdr.type!=HDR_OTHER_T)
{
LOG(L_INFO,"INFO:xprint: xl_parse_format: using "
"hdr type (%d) instead of <%.*s>\n",