From: Dmitry Volyntsev Date: Thu, 5 Apr 2018 11:50:45 +0000 (+0300) Subject: Checking the number argument of HTTP return() method is valid. X-Git-Tag: 0.2.1~36 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=69cec78a2385a3eb8c618ef3b357819256bc20e9;p=njs.git Checking the number argument of HTTP return() method is valid. --- diff --git a/nginx/ngx_http_js_module.c b/nginx/ngx_http_js_module.c index d5a6957e..3f08dd7e 100644 --- a/nginx/ngx_http_js_module.c +++ b/nginx/ngx_http_js_module.c @@ -1284,7 +1284,7 @@ ngx_http_js_ext_return(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, } value = njs_argument(args, 1); - if (!njs_value_is_number(value)) { + if (!njs_value_is_valid_number(value)) { description = "code is not a number"; goto exception; }