diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c index 8b861ce34..7c8de1445 100644 --- a/src/http/ngx_http_script.c +++ b/src/http/ngx_http_script.c @@ -265,7 +265,7 @@ ngx_http_test_predicates(ngx_http_request_t *r, ngx_array_t *predicates) return NGX_ERROR; } - if (val.len && val.data[0] != '0') { + if (val.len && (val.len != 1 || val.data[0] != '0')) { return NGX_DECLINED; } }