diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-09-29 04:47:22 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-09-29 04:47:22 +0000 |
commit | 4ca2acfce02d76260e8c7c3c7d9d6a7d9a0a3d88 (patch) | |
tree | ff907434906149e45b0f8e63b473ef7bc402149f /src | |
parent | 9059ecae8301b77447a0f568f4a826d5f2e54f52 (diff) | |
download | nginx-4ca2acfce02d76260e8c7c3c7d9d6a7d9a0a3d88.tar.gz nginx-4ca2acfce02d76260e8c7c3c7d9d6a7d9a0a3d88.zip |
disable $realpath_root variable in a "root" directive
Diffstat (limited to 'src')
-rw-r--r-- | src/http/ngx_http_core_module.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index ebd082f59..1d8a55222 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -3291,6 +3291,17 @@ ngx_http_core_root(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) return NGX_CONF_ERROR; } + if (ngx_strstr(value[1].data, "$realpath_root") + || ngx_strstr(value[1].data, "${realpath_root}")) + { + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "the $realpath_root variable may not be used " + "in the \"%V\" directive", + &cmd->name); + + return NGX_CONF_ERROR; + } + lcf->alias = alias; lcf->root = value[1]; |