# HG changeset patch # User Valentin Bartenev # Date 1369326627 -14400 # Node ID ea41bba49e8a14db045b6fe8e896bb7b1be0d759 # Parent a30ea5c6451dcae3ce1e6d9eabe718c0222e5d9f 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 { } diff -r a30ea5c6451d -r ea41bba49e8a src/core/ngx_conf_file.c --- a/src/core/ngx_conf_file.c Thu May 23 16:26:10 2013 +0400 +++ b/src/core/ngx_conf_file.c Thu May 23 20:30:27 2013 +0400 @@ -225,6 +225,11 @@ * "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;