[njs] Checking the number argument of HTTP return() method is valid.

Dmitry Volyntsev xeioex at nginx.com
Thu Apr 5 11:51:03 UTC 2018


details:   http://hg.nginx.org/njs/rev/9d5914cc9100
branches:  
changeset: 494:9d5914cc9100
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Thu Apr 05 14:50:45 2018 +0300
description:
Checking the number argument of HTTP return() method is valid.

diffstat:

 nginx/ngx_http_js_module.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 67edba3688e4 -r 9d5914cc9100 nginx/ngx_http_js_module.c
--- a/nginx/ngx_http_js_module.c	Thu Apr 05 14:50:45 2018 +0300
+++ b/nginx/ngx_http_js_module.c	Thu Apr 05 14:50:45 2018 +0300
@@ -1284,7 +1284,7 @@ ngx_http_js_ext_return(njs_vm_t *vm, njs
     }
 
     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;
     }


More information about the nginx-devel mailing list