mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-26 08:10:11 +01:00
truncate extremely long from address and message_id
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
2cfd5ece53
commit
553d7e92c0
@ -69,6 +69,13 @@ void post_parse(struct session_data *sdata, struct parser_state *state, struct c
|
|||||||
clearhash(state->rcpt_domain);
|
clearhash(state->rcpt_domain);
|
||||||
clearhash(state->journal_recipient);
|
clearhash(state->journal_recipient);
|
||||||
|
|
||||||
|
// Fix From: line if it's too long
|
||||||
|
if(strlen(state->b_from) > 255) state->b_from[255] = '\0';
|
||||||
|
if(strlen(state->b_from_domain) > 255) state->b_from_domain[255] = '\0';
|
||||||
|
|
||||||
|
// Truncate the message_id if it's >255 characters
|
||||||
|
if(strlen(state->message_id) > 255) state->message_id[255] = '\0';
|
||||||
|
|
||||||
fixupEncodedHeaderLine(state->b_subject, MAXBUFSIZE);
|
fixupEncodedHeaderLine(state->b_subject, MAXBUFSIZE);
|
||||||
trimBuffer(state->b_subject);
|
trimBuffer(state->b_subject);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user