mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-21 22:45:34 +00:00
MEDIUM: cfgparse: Emit hard error on truncated lines
As announced within the emitted log message this is going to become a hard
error in 2.3. It's 2.3 time now, let's do this.
see 2fd5bdb439
This commit is contained in:
parent
8564f53812
commit
f92afb732b
@ -1876,11 +1876,11 @@ next_line:
|
|||||||
char *line = thisline;
|
char *line = thisline;
|
||||||
|
|
||||||
if (missing_lf != -1) {
|
if (missing_lf != -1) {
|
||||||
ha_warning("parsing [%s:%d]: Stray NUL character at position %d. "
|
ha_alert("parsing [%s:%d]: Stray NUL character at position %d.\n",
|
||||||
"This will become a hard error in HAProxy 2.3.\n",
|
file, linenum, (missing_lf + 1));
|
||||||
file, linenum, (missing_lf + 1));
|
err_code |= ERR_ALERT | ERR_FATAL;
|
||||||
err_code |= ERR_WARN;
|
|
||||||
missing_lf = -1;
|
missing_lf = -1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
linenum++;
|
linenum++;
|
||||||
@ -2086,10 +2086,9 @@ next_line:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (missing_lf != -1) {
|
if (missing_lf != -1) {
|
||||||
ha_warning("parsing [%s:%d]: Missing LF on last line, file might have been truncated at position %d. "
|
ha_alert("parsing [%s:%d]: Missing LF on last line, file might have been truncated at position %d.\n",
|
||||||
"This will become a hard error in HAProxy 2.3.\n",
|
file, linenum, (missing_lf + 1));
|
||||||
file, linenum, (missing_lf + 1));
|
err_code |= ERR_ALERT | ERR_FATAL;
|
||||||
err_code |= ERR_WARN;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cs && cs->post_section_parser)
|
if (cs && cs->post_section_parser)
|
||||||
|
Loading…
Reference in New Issue
Block a user