mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-08 00:21:59 +01:00
prevent too future dates
This commit is contained in:
parent
c336bc3b5b
commit
f5a2144cb5
@ -387,8 +387,8 @@ int parse_line(char *buf, struct _state *state, struct session_data *sdata, int
|
||||
else {
|
||||
sdata->sent = parse_date_header(buf, cfg);
|
||||
|
||||
/* allow +/-1 week drift in the parsed Date: value */
|
||||
if(sdata->now - sdata->sent > 604800 || sdata->sent - sdata->now > 604800) sdata->sent = sdata->now;
|
||||
/* allow -1 week ... +1 day drift in the parsed Date: value */
|
||||
if(sdata->now - sdata->sent > 604800 || sdata->sent - sdata->now > 86400) sdata->sent = sdata->now;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user