From c0301ceaca538b31b43bd0b572520ecb2039f3d0 Mon Sep 17 00:00:00 2001 From: SJ Date: Fri, 22 Nov 2013 21:44:04 +0100 Subject: [PATCH] journal header parsing fix --- src/config.h | 2 +- src/parser.c | 3 ++- webui/tmp/.htaccess | 2 -- webui/tmp/index.html | 0 4 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 webui/tmp/.htaccess create mode 100644 webui/tmp/index.html diff --git a/src/config.h b/src/config.h index c8c75d64..31b1009c 100644 --- a/src/config.h +++ b/src/config.h @@ -14,7 +14,7 @@ #define VERSION "0.1.25-master-branch" -#define BUILD 850 +#define BUILD 851 #define HOSTID "mailarchiver" diff --git a/src/parser.c b/src/parser.c index d1e6c646..c7529cbf 100644 --- a/src/parser.c +++ b/src/parser.c @@ -203,11 +203,12 @@ int parse_line(char *buf, struct _state *state, struct session_data *sdata, int } if(sdata->ms_journal == 1 && strncasecmp(buf, "Received:", strlen("Received:")) == 0){ + if(state->is_1st_header == 0) memset(state->b_subject, 0, MAXBUFSIZE); + state->is_1st_header = 1; state->is_header = 1; memset(state->b_body, 0, BIGBUFSIZE); state->bodylen = 0; - memset(state->b_subject, 0, MAXBUFSIZE); } if(take_into_pieces == 1){ diff --git a/webui/tmp/.htaccess b/webui/tmp/.htaccess deleted file mode 100644 index ff2beb84..00000000 --- a/webui/tmp/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -order deny,allow -deny from all diff --git a/webui/tmp/index.html b/webui/tmp/index.html new file mode 100644 index 00000000..e69de29b