Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/http
diff options
context:
space:
mode:
authorGena Makhomed <gmm@csdoc.com>2018-09-24 20:26:46 +0300
committerGena Makhomed <gmm@csdoc.com>2018-09-24 20:26:46 +0300
commit1065455289d72b140f9e63a420b531eaae2d4039 (patch)
treecf23c29201ffa1ee5f811480e77d0ce40ff46e1d /src/http
parent8117b3f5a06b68afb292ddd19bf6ee6000707232 (diff)
Cache: status must be less then 599 in *_cache_valid directives.
Previously, configurations with typo, for example fastcgi_cache_valid 200301 302 5m; successfully pass configuration test. Adding check for status codes > 599, and such configurations are now properly rejected.
Diffstat (limited to 'src/http')
-rw-r--r--src/http/ngx_http_file_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_file_cache.c b/src/http/ngx_http_file_cache.c
index 56866fa4e..330833df6 100644
--- a/src/http/ngx_http_file_cache.c
+++ b/src/http/ngx_http_file_cache.c
@@ -2669,7 +2669,7 @@ ngx_http_file_cache_valid_set_slot(ngx_conf_t *cf, ngx_command_t *cmd,
} else {
status = ngx_atoi(value[i].data, value[i].len);
- if (status < 100) {
+ if (status < 100 || status > 599) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"invalid status \"%V\"", &value[i]);
return NGX_CONF_ERROR;