mirror of
https://github.com/nginx/nginx.git
synced 2026-10-22 20:11:17 +00:00
Core: strengthen configuration syntax checker.
It is now a syntax error if tokens passed to a custom configuration
handler are terminated by "{".
The following incorrect configuration is now properly rejected:
map $v $v2 {
a b {
c d {
e f {
}
This commit is contained in:
parent
2c0ea0fcc8
commit
c8702948db
1 changed files with 5 additions and 0 deletions
|
|
@ -225,6 +225,11 @@ ngx_conf_parse(ngx_conf_t *cf, ngx_str_t *filename)
|
|||
* "types { ... }" directive
|
||||
*/
|
||||
|
||||
if (rc == NGX_CONF_BLOCK_START) {
|
||||
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "unexpected \"{\"");
|
||||
goto failed;
|
||||
}
|
||||
|
||||
rv = (*cf->handler)(cf, NULL, cf->handler_conf);
|
||||
if (rv == NGX_CONF_OK) {
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue