summaryrefslogtreecommitdiffstats
path: root/usr.sbin/nginx/src/http/ngx_http_script.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/nginx/src/http/ngx_http_script.c')
-rw-r--r--usr.sbin/nginx/src/http/ngx_http_script.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.sbin/nginx/src/http/ngx_http_script.c b/usr.sbin/nginx/src/http/ngx_http_script.c
index 77ac9a629f5..ce290f4ef67 100644
--- a/usr.sbin/nginx/src/http/ngx_http_script.c
+++ b/usr.sbin/nginx/src/http/ngx_http_script.c
@@ -1506,6 +1506,12 @@ ngx_http_script_file_code(ngx_http_script_engine_t *e)
of.errors = clcf->open_file_cache_errors;
of.events = clcf->open_file_cache_events;
+ if (ngx_http_set_disable_symlinks(r, clcf, &path, &of) != NGX_OK) {
+ e->ip = ngx_http_script_exit;
+ e->status = NGX_HTTP_INTERNAL_SERVER_ERROR;
+ return;
+ }
+
if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool)
!= NGX_OK)
{