parser fix

This commit is contained in:
SJ 2015-12-29 15:09:54 +01:00
parent 8f63cf29c9
commit d261cc98de
2 changed files with 5 additions and 8 deletions

View File

@ -13,7 +13,7 @@
#define VERSION "1.2.0-master"
#define BUILD 933
#define BUILD 934
#define HOSTID "mailarchiver"

View File

@ -677,15 +677,12 @@ int parse_line(char *buf, struct parser_state *state, struct session_data *sdata
if(puf[0] == '\0') continue;
strncat(puf, " ", sizeof(puf)-strlen(puf)-1);
if(strncasecmp(puf, "http://", 7) == 0 || strncasecmp(puf, "https://", 8) == 0) fixURL(puf, sizeof(puf)-1);
len = strlen(puf);
strncat(puf, " ", sizeof(puf)-len-1);
if(strncasecmp(puf, "http://", 7) == 0 || strncasecmp(puf, "https://", 8) == 0){
fixURL(puf, sizeof(puf)-1);
len = strlen(puf);
}
if(state->is_header == 0 && strncmp(puf, "__URL__", 7) && (puf[0] == ' ' || (len > MAX_WORD_LEN && cfg->enable_cjk == 0) || isHexNumber(puf)) ) continue;