mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
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.
This commit is contained in:
parent
8117b3f5a0
commit
1065455289
@ -2669,7 +2669,7 @@ ngx_http_file_cache_valid_set_slot(ngx_conf_t *cf, ngx_command_t *cmd,
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
status = ngx_atoi(value[i].data, value[i].len);
|
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,
|
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
|
||||||
"invalid status \"%V\"", &value[i]);
|
"invalid status \"%V\"", &value[i]);
|
||||||
return NGX_CONF_ERROR;
|
return NGX_CONF_ERROR;
|
||||||
|
Loading…
Reference in New Issue
Block a user