[njs] Fetch: fixed heap-buffer-overflow in Headers.get().

2024-05-24 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/f75f670905f0 branches: changeset: 2339:f75f670905f0 user: Dmitry Volyntsev date: Thu May 23 22:50:34 2024 -0700 description: Fetch: fixed heap-buffer-overflow in Headers.get(). Previously, when more than one header with the same name added

[njs] Added fast path in njs_chb_utf8_length() for ASCII input.

2024-05-24 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/437fc09db765 branches: changeset: 2338:437fc09db765 user: Dmitry Volyntsev date: Thu May 23 22:50:19 2024 -0700 description: Added fast path in njs_chb_utf8_length() for ASCII input. diffstat: src/njs_chb.h| 19

[njs] Fixed retval handling after an exception.

2024-05-23 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/585756e8cafe branches: changeset: 2337:585756e8cafe user: Dmitry Volyntsev date: Wed May 22 23:08:15 2024 -0700 description: Fixed retval handling after an exception. Previously, some functions set a retval too early. If this happened before

[njs] Improved String.prototype.replaceAll() for readability.

2024-05-22 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/077a5b2f30d8 branches: changeset: 2336:077a5b2f30d8 user: Dmitry Volyntsev date: Wed May 22 17:26:16 2024 -0700 description: Improved String.prototype.replaceAll() for readability. diffstat: src/njs_string.c | 44

[njs] Fixed String.prototype.replaceAll() with zero length argument.

2024-05-22 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/e496851c0fe7 branches: changeset: 2335:e496851c0fe7 user: Dmitry Volyntsev date: Wed May 22 17:26:08 2024 -0700 description: Fixed String.prototype.replaceAll() with zero length argument. This fixes #712 issue on Github. diffstat: src

[njs] Aligned StringIndexOf() implementation with the spec.

2024-05-22 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/bc09b884022d branches: changeset: 2334:bc09b884022d user: Dmitry Volyntsev date: Tue May 21 23:41:10 2024 -0700 description: Aligned StringIndexOf() implementation with the spec. When searchValue is empty the function should return early when

[njs] Removed code for byte strings in built-in functions.

2024-05-22 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/2d098d2a1c85 branches: changeset: 2333:2d098d2a1c85 user: Dmitry Volyntsev date: Tue May 21 23:41:10 2024 -0700 description: Removed code for byte strings in built-in functions. diffstat: src/njs_array.c | 52

[njs] Avoid creating byte strings explicitly.

2024-05-22 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/27da19960b72 branches: changeset: 2332:27da19960b72 user: Dmitry Volyntsev date: Tue May 21 23:38:19 2024 -0700 description: Avoid creating byte strings explicitly. Previously, calls like njs_string_new(,,,0) produced byte strings by explicitly

[njs] HTTP: fixed handling of 0 length request body.

2024-05-20 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/286dbef3c0b2 branches: changeset: 2331:286dbef3c0b2 user: Dmitry Volyntsev date: Mon May 20 16:44:10 2024 -0700 description: HTTP: fixed handling of 0 length request body. Previously, when r.requestBuffer was passed as a body argument

[njs] Removing njs_string_set() from builtin functions.

2024-05-17 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/8851a78723dc branches: changeset: 2330:8851a78723dc user: Dmitry Volyntsev date: Fri May 17 21:54:50 2024 -0700 description: Removing njs_string_set() from builtin functions. This is the last function that produced byte strings. diffstat

[njs] Change: removed byte strings API.

2024-05-17 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/4e0553f7ea68 branches: changeset: 2329:4e0553f7ea68 user: Dmitry Volyntsev date: Fri May 17 21:54:50 2024 -0700 description: Change: removed byte strings API. These functions are unsafe because they produce byte strings. Byte strings may

[njs] Optimized string creation with ASCII input.

2024-05-17 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/dec46ad52e9a branches: changeset: 2328:dec46ad52e9a user: Dmitry Volyntsev date: Fri May 17 21:54:49 2024 -0700 description: Optimized string creation with ASCII input. diffstat: src/njs_string.c | 12 1 files changed, 12

[njs] Added string creation benchmark.

2024-05-17 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/f474755a4dce branches: changeset: 2327:f474755a4dce user: Dmitry Volyntsev date: Fri May 17 18:36:12 2024 -0700 description: Added string creation benchmark. diffstat: src/test/njs_benchmark.c | 159

[njs] Configure: fixed QuickJS detection with --with-quickjs flag.

2024-05-09 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/02369792b032 branches: changeset: 2326:02369792b032 user: Dmitry Volyntsev date: Thu May 09 12:58:57 2024 -0700 description: Configure: fixed QuickJS detection with --with-quickjs flag. diffstat: auto/quickjs | 2 +- 1 files changed, 1

[njs] QuickJS: added zlib module.

2024-05-01 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/f146b5dc21cc branches: changeset: 2325:f146b5dc21cc user: Dmitry Volyntsev date: Wed May 01 17:31:01 2024 -0700 description: QuickJS: added zlib module. diffstat: auto/init | 1 + auto/make |42

[njs] Tests: fixed typo in stream_js_dup_set.t introduced in be271e8d0b3b.

2024-04-29 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/18fc657411ca branches: changeset: 2324:18fc657411ca user: Dmitry Volyntsev date: Fri Apr 26 16:48:19 2024 -0700 description: Tests: fixed typo in stream_js_dup_set.t introduced in be271e8d0b3b. Previously, with typo the test was always skipped

[njs] Fetch: fixed request Host header when the port is non-standard.

2024-04-29 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/7456fe29ac0a branches: changeset: 2323:7456fe29ac0a user: Dmitry Volyntsev date: Fri Apr 26 16:48:17 2024 -0700 description: Fetch: fixed request Host header when the port is non-standard. This fixes #707 issue on Github. diffstat: nginx

[njs] Allowing to use custom allocator in njs_chb_t.

2024-04-29 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/622387b5b612 branches: changeset: 2322:622387b5b612 user: Dmitry Volyntsev date: Fri Apr 26 16:27:52 2024 -0700 description: Allowing to use custom allocator in njs_chb_t. diffstat: external/njs_query_string_module.c | 6 +++--- external

[njs] Configure: fixed default path QuickJS discovery typo.

2024-04-22 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/a97a9f3b3cea branches: changeset: 2321:a97a9f3b3cea user: Dmitry Volyntsev date: Mon Apr 22 18:59:03 2024 -0700 description: Configure: fixed default path QuickJS discovery typo. The issue was introduced in 1c8b6b9bc06c (0.8.4). This closes

[njs] Zlib: improved tests with zlib-ng.

2024-04-22 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/0cb259f67ade branches: changeset: 2320:0cb259f67ade user: Dmitry Volyntsev date: Mon Apr 22 17:52:14 2024 -0700 description: Zlib: improved tests with zlib-ng. This fixes #704 issue on Github. diffstat: src/test/njs_unit_test.c | 13

[njs] Zlib: fixed inflate().

2024-04-22 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/d640adf691a7 branches: changeset: 2319:d640adf691a7 user: Dmitry Volyntsev date: Mon Apr 22 17:52:06 2024 -0700 description: Zlib: fixed inflate(). Previously, the function might fail to return the last part of the compressed content

[njs] Modules: improved checking for duplicate js_set variables.

2024-04-22 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/be271e8d0b3b branches: changeset: 2318:be271e8d0b3b user: Dmitry Volyntsev date: Mon Apr 22 17:51:45 2024 -0700 description: Modules: improved checking for duplicate js_set variables. Since 6fb1aca4eeaf (0.8.4) the identical js_set variables

[njs] Version bump.

2024-04-22 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/b73f99c7bc54 branches: changeset: 2317:b73f99c7bc54 user: Dmitry Volyntsev date: Mon Apr 22 17:51:24 2024 -0700 description: Version bump. diffstat: src/njs.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (14 lines

njs-0.8.4

2024-04-16 Thread Dmitry Volyntsev
Hello, I'm glad to announce a new release of NGINX JavaScript module (njs). This release introduced the initial QuickJS engine support in CLI as well as regular bugfixes. Notable new features: - QuickJS in njs CLI: : $ ./configure --cc-opt="-I/path/to/quickjs -L/path/to/quickjs" && make njs :

[nginx-announce] njs-0.8.4

2024-04-16 Thread Dmitry Volyntsev
Hello, I'm glad to announce a new release of NGINX JavaScript module (njs). This release introduced the initial QuickJS engine support in CLI as well as regular bugfixes. Notable new features: - QuickJS in njs CLI: : $ ./configure --cc-opt="-I/path/to/quickjs -L/path/to/quickjs" && make njs :

[njs] Added tag 0.8.4 for changeset 11d956c1577c

2024-04-15 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/7133f0400019 branches: changeset: 2316:7133f0400019 user: Dmitry Volyntsev date: Mon Apr 15 16:44:33 2024 -0700 description: Added tag 0.8.4 for changeset 11d956c1577c diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions

[njs] Version 0.8.4.

2024-04-15 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/11d956c1577c branches: changeset: 2315:11d956c1577c user: Dmitry Volyntsev date: Mon Apr 15 16:40:21 2024 -0700 description: Version 0.8.4. diffstat: CHANGES | 21 + 1 files changed, 21 insertions(+), 0 deletions

[njs] HTTP: fixed r.send() with Buffer argument.

2024-04-08 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/adaeb3c3f59a branches: changeset: 2314:adaeb3c3f59a user: Dmitry Volyntsev date: Mon Apr 08 22:47:28 2024 -0700 description: HTTP: fixed r.send() with Buffer argument. Previously, only string value type was accepted. This closes #701 issue

[njs] Modules: checking for duplicate js_set variables.

2024-04-08 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/6fb1aca4eeaf branches: changeset: 2313:6fb1aca4eeaf user: Dmitry Volyntsev date: Mon Apr 08 22:47:24 2024 -0700 description: Modules: checking for duplicate js_set variables. This closes #700 issue on Github. diffstat: nginx

[njs] Configure: added --with-quickjs option.

2024-04-04 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/1c8b6b9bc06c branches: changeset: 2312:1c8b6b9bc06c user: Dmitry Volyntsev date: Thu Apr 04 16:07:53 2024 -0700 description: Configure: added --with-quickjs option. diffstat: auto/help| 1 + auto/options | 6 -- auto/quickjs | 13

[njs] Configure: improved QuickJS discovery.

2024-04-04 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/834096122cef branches: changeset: 2311:834096122cef user: Dmitry Volyntsev date: Thu Apr 04 16:07:46 2024 -0700 description: Configure: improved QuickJS discovery. At the first try do not assume the exact library and includes location

[njs] Configure: added --no-quickjs description in configure --help.

2024-04-04 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/b83e2ae81937 branches: changeset: 2310:b83e2ae81937 user: Dmitry Volyntsev date: Thu Apr 04 16:07:39 2024 -0700 description: Configure: added --no-quickjs description in configure --help. Forgotten in cb3e068a511c. diffstat: auto/help | 1

[njs] Configure: sorted options alphabetically in configure --help.

2024-04-04 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/3a5b8b59cce9 branches: changeset: 2309:3a5b8b59cce9 user: Dmitry Volyntsev date: Thu Apr 04 16:07:37 2024 -0700 description: Configure: sorted options alphabetically in configure --help. diffstat: auto/help | 68

[njs] HTTP: validating URI and args arguments in r.subrequest().

2024-04-02 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/2d6d9d1e8b8f branches: changeset: 2308:2d6d9d1e8b8f user: Dmitry Volyntsev date: Tue Apr 02 08:52:56 2024 -0700 description: HTTP: validating URI and args arguments in r.subrequest(). diffstat: nginx/ngx_http_js_module.c | 37

[njs] Tests: adapt stream_js.t to nginx changes.

2024-04-02 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/17af51d42ad9 branches: changeset: 2307:17af51d42ad9 user: Dmitry Volyntsev date: Mon Apr 01 23:13:25 2024 -0700 description: Tests: adapt stream_js.t to nginx changes. Make the test more robust against changes in nginx, specifically

[njs] Tests: adapt stream_js_preload_object.t to nginx changes.

2024-04-02 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/454d9c032c60 branches: changeset: 2306:454d9c032c60 user: Dmitry Volyntsev date: Mon Apr 01 23:13:24 2024 -0700 description: Tests: adapt stream_js_preload_object.t to nginx changes. Make the test more robust against changes in nginx

[njs] Tests: simplified stream_js_import2.t.

2024-04-02 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/498b2387ef04 branches: changeset: 2305:498b2387ef04 user: Dmitry Volyntsev date: Mon Apr 01 23:13:23 2024 -0700 description: Tests: simplified stream_js_import2.t. The test should only verify js_import directive in server context according

[njs] Tests: removed stream_js_import.t.

2024-04-02 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/e16e93f43303 branches: changeset: 2304:e16e93f43303 user: Dmitry Volyntsev date: Mon Apr 01 23:13:21 2024 -0700 description: Tests: removed stream_js_import.t. js_import is the only directive to load JS code since 0.7.1, so the test

[njs] Modules: fixed clear() method of a shared dictionary without timeout.

2024-03-20 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/f632fe16ba05 branches: changeset: 2303:f632fe16ba05 user: Dmitry Volyntsev date: Tue Mar 19 21:05:51 2024 -0700 description: Modules: fixed clear() method of a shared dictionary without timeout. Previously, the code did not unlock the rwlock

[njs] Shell: added completions for QuickJS engine.

2024-03-18 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/85313a068147 branches: changeset: 2302:85313a068147 user: Dmitry Volyntsev date: Mon Mar 18 22:24:57 2024 -0700 description: Shell: added completions for QuickJS engine. diffstat: external/njs_shell.c| 202

[njs] Shell: completions are refactored and moved out of the core.

2024-03-18 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/fe94552843d7 branches: changeset: 2301:fe94552843d7 user: Dmitry Volyntsev date: Mon Mar 18 22:15:48 2024 -0700 description: Shell: completions are refactored and moved out of the core. diffstat: external/njs_shell.c| 275

[njs] Introduced njs_vm_value_enumerate() and njs_vm_value_own_enumerate().

2024-03-18 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/1aa2bb15c966 branches: changeset: 2300:1aa2bb15c966 user: Dmitry Volyntsev date: Fri Mar 15 23:14:39 2024 -0700 description: Introduced njs_vm_value_enumerate() and njs_vm_value_own_enumerate(). diffstat: src/njs.h | 16 ++ src

[njs] Refactoring njs_value_own_enumerate() and friends.

2024-03-18 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/b0e42db5ca84 branches: changeset: 2299:b0e42db5ca84 user: Dmitry Volyntsev date: Fri Mar 15 22:47:50 2024 -0700 description: Refactoring njs_value_own_enumerate() and friends. All three flag-like arguments are merged into a single flag argument

[njs] Introduced njs_vm_prototype() to get a value's prototype.

2024-03-18 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/6808a27d254a branches: changeset: 2298:6808a27d254a user: Dmitry Volyntsev date: Thu Mar 14 23:28:03 2024 -0700 description: Introduced njs_vm_prototype() to get a value's prototype. diffstat: src/njs.h| 2 ++ src/njs_object.c | 2

[njs] Introduced njs_vm_global() to get global object.

2024-03-18 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/00b89201fb71 branches: changeset: 2297:00b89201fb71 user: Dmitry Volyntsev date: Thu Mar 14 23:28:03 2024 -0700 description: Introduced njs_vm_global() to get global object. diffstat: src/njs.h| 1 + src/njs_vm.c | 8 2 files

Re: lock in nginx/njs

2024-03-13 Thread Dmitry Volyntsev
On 12.03.2024 23:00, Eugene Prokopiev wrote: Здравствуйте! Скажите, нет ли чего-нибудь похожего на https://github.com/openresty/lua-resty-lock/ в nginx/njs? Или может есть другой способ разрешить выполнять запросы с одинаковым $uri строго по очереди (один выполняется, остальные ждут)? А чем

Re: [PATCH] HTTP: remove needless code

2024-03-05 Thread Dmitry Volyntsev
On 3/5/24 10:15 AM, Sergey A. Osokin wrote: # HG changeset patch # User Sergey A. Osokin # Date 1709662441 -10800 # Tue Mar 05 21:14:01 2024 +0300 # Node ID 00de871f1e5e0936e2401aaec863bf7040de8608 # Parent eb01434865d7b698f036f199084308726c2827ea HTTP: remove needless code. diff -r

[njs] Fixed typo introduced in eb01434865d7.

2024-03-05 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/8309b884e265 branches: changeset: 2296:8309b884e265 user: Dmitry Volyntsev date: Tue Mar 05 11:43:49 2024 -0800 description: Fixed typo introduced in eb01434865d7. diffstat: nginx/ngx_http_js_module.c | 2 -- 1 files changed, 0 insertions

[njs] HTTP: allowing to set Server header.

2024-03-05 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/eb01434865d7 branches: changeset: 2295:eb01434865d7 user: Dmitry Volyntsev date: Thu Feb 29 20:56:56 2024 -0800 description: HTTP: allowing to set Server header. diffstat: nginx/ngx_http_js_module.c | 38

[njs] Shell: revert -t option back to preserve backward compatibility.

2024-02-29 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/d7a0bbcba46e branches: changeset: 2294:d7a0bbcba46e user: Dmitry Volyntsev date: Thu Feb 29 18:56:13 2024 -0800 description: Shell: revert -t option back to preserve backward compatibility. The issue was introduced in cb3e068a511c. diffstat

[njs] Removed duplicate expect tests introduced in cb3e068a511c.

2024-02-29 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/49417e2749e0 branches: changeset: 2293:49417e2749e0 user: Dmitry Volyntsev date: Tue Feb 27 23:25:11 2024 -0800 description: Removed duplicate expect tests introduced in cb3e068a511c. diffstat: test/shell_test_njs.exp | 32

[njs] Shell: fixed memory pool issues introduced in cb3e068a511c.

2024-02-29 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/46699330f4f2 branches: changeset: 2292:46699330f4f2 user: Dmitry Volyntsev date: Tue Feb 27 23:25:05 2024 -0800 description: Shell: fixed memory pool issues introduced in cb3e068a511c. diffstat: external/njs_shell.c | 15 +-- 1

[njs] Simplified working with global value.

2024-02-29 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/e73d4947372d branches: changeset: 2291:e73d4947372d user: Dmitry Volyntsev date: Tue Feb 27 23:24:55 2024 -0800 description: Simplified working with global value. diffstat: src/njs_builtin.c | 6 ++ src/njs_function.c | 2 +- src

[njs] Shell: added QuickJS engine support.

2024-02-22 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/cb3e068a511c branches: changeset: 2290:cb3e068a511c user: Dmitry Volyntsev date: Thu Feb 22 20:25:43 2024 -0800 description: Shell: added QuickJS engine support. diffstat: auto/expect |22 +- auto/make|23

[njs] Fixed atob() with non-padded base64 strings.

2024-02-22 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/272af619b821 branches: changeset: 2289:272af619b821 user: Dmitry Volyntsev date: Thu Feb 22 17:38:58 2024 -0800 description: Fixed atob() with non-padded base64 strings. This fixes #695 issue on Github. diffstat: src/njs_string.c

[njs] Moving hash code out of the njs core.

2024-02-14 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/0479e5821ab2 branches: changeset: 2288:0479e5821ab2 user: Dmitry Volyntsev date: Wed Feb 14 21:34:02 2024 -0800 description: Moving hash code out of the njs core. diffstat: auto/modules |5 +- auto/sources

[njs] Moved njs_time() out of the core as it is not a part of the spec.

2024-02-14 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/6fa96ea99037 branches: changeset: 2287:6fa96ea99037 user: Dmitry Volyntsev date: Wed Feb 14 21:33:56 2024 -0800 description: Moved njs_time() out of the core as it is not a part of the spec. diffstat: auto/sources | 1

[njs] Test262: fix import_global_ref_var.t.js.

2024-02-07 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/d3a9f2f153f8 branches: changeset: 2286:d3a9f2f153f8 user: Dmitry Volyntsev date: Wed Feb 07 17:57:02 2024 -0800 description: Test262: fix import_global_ref_var.t.js. diffstat: test/js/import_global_ref_var.t.js | 2 +- test/js/module

[njs] Test262: simplified import_chain.t.js.

2024-02-07 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/82ae061db9d0 branches: changeset: 2285:82ae061db9d0 user: Dmitry Volyntsev date: Wed Feb 07 17:57:01 2024 -0800 description: Test262: simplified import_chain.t.js. Avoid using "crypto" module, which unnessesary complicates the test.

[njs] Removed njs_file.c not needed after 8aad26845b18 (0.8.3).

2024-02-07 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/45f72ce8761b branches: changeset: 2284:45f72ce8761b user: Dmitry Volyntsev date: Wed Feb 07 17:57:01 2024 -0800 description: Removed njs_file.c not needed after 8aad26845b18 (0.8.3). diffstat: auto/sources | 1 - src/njs_file.c

[njs] Version bump.

2024-02-07 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/93562e512d26 branches: changeset: 2283:93562e512d26 user: Dmitry Volyntsev date: Wed Feb 07 17:56:59 2024 -0800 description: Version bump. diffstat: src/njs.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (14 lines

njs-0.8.3

2024-02-07 Thread Dmitry Volyntsev
Hello, I'm glad to announce a new release of NGINX JavaScript module (njs). This release focuses on stabilization of recently released features and fixing bugs found by various fuzzers. Learn more about njs: - Overview and introduction:   https://nginx.org/en/docs/njs/ - NGINX JavaScript

[nginx-announce] njs-0.8.3

2024-02-07 Thread Dmitry Volyntsev
Hello, I'm glad to announce a new release of NGINX JavaScript module (njs). This release focuses on stabilization of recently released features and fixing bugs found by various fuzzers. Learn more about njs: - Overview and introduction:   https://nginx.org/en/docs/njs/ - NGINX JavaScript

[njs] Added tag 0.8.3 for changeset 3aba7ee62080

2024-02-07 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/f98dd6884786 branches: changeset: 2282:f98dd6884786 user: Dmitry Volyntsev date: Wed Feb 07 08:34:17 2024 -0800 description: Added tag 0.8.3 for changeset 3aba7ee62080 diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions

[njs] Version 0.8.3.

2024-02-07 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/3aba7ee62080 branches: changeset: 2281:3aba7ee62080 user: Dmitry Volyntsev date: Wed Feb 07 08:34:00 2024 -0800 description: Version 0.8.3. diffstat: CHANGES | 31 +++ 1 files changed, 31 insertions(+), 0

[njs] Reverted changes introduced in 7eaaa7d57636 (not released) back.

2024-02-06 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/25e548de3d61 branches: changeset: 2280:25e548de3d61 user: Dmitry Volyntsev date: Tue Feb 06 19:32:08 2024 -0800 description: Reverted changes introduced in 7eaaa7d57636 (not released) back. Relative importing is again supported. diffstat

[njs] HTTP: fixed stub_status statistic when js_periodic is enabled.

2024-01-31 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/673d78618fc9 branches: changeset: 2279:673d78618fc9 user: Dmitry Volyntsev date: Wed Jan 31 17:06:58 2024 -0800 description: HTTP: fixed stub_status statistic when js_periodic is enabled. Previously, when js_periodic is enabled the Reading

[njs] Style.

2024-01-29 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/fca50ba4db9d branches: changeset: 2278:fca50ba4db9d user: Dmitry Volyntsev date: Mon Jan 29 17:16:08 2024 -0800 description: Style. diffstat: src/njs_builtin.c | 2 +- src/njs_clang.h | 26 +- 2 files changed, 14

[njs] 2024 year.

2024-01-29 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/478795e3296b branches: changeset: 2277:478795e3296b user: Dmitry Volyntsev date: Mon Jan 29 17:16:07 2024 -0800 description: 2024 year. diffstat: LICENSE | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diffs (16 lines): diff

[njs] Test262: handling the mkdir issue with a host file system.

2024-01-29 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/9e2a757cb33e branches: changeset: 2276:9e2a757cb33e user: Dmitry Volyntsev date: Mon Jan 29 17:16:01 2024 -0800 description: Test262: handling the mkdir issue with a host file system. diffstat: test/fs/promises_05.t.js | 13 - 1

[njs] Fixed fuzzer build after 9b3dac56fd8a.

2024-01-25 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/6770c015efdc branches: changeset: 2273:6770c015efdc user: Dmitry Volyntsev date: Thu Jan 25 14:48:05 2024 -0800 description: Fixed fuzzer build after 9b3dac56fd8a. diffstat: external/njs_shell.c | 60

[njs] Moving out HostLoadImportedModule from njs core.

2024-01-23 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/9b3dac56fd8a branches: changeset: 2272:9b3dac56fd8a user: Dmitry Volyntsev date: Tue Jan 23 16:34:10 2024 -0800 description: Moving out HostLoadImportedModule from njs core. HostLoadImportedModule should be implemented by host environment

[njs] Change: imported modules are not resolved relative to current dir.

2024-01-23 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/7eaaa7d57636 branches: changeset: 2271:7eaaa7d57636 user: Dmitry Volyntsev date: Tue Jan 23 16:33:52 2024 -0800 description: Change: imported modules are not resolved relative to current dir. Previously, when a module was imported

[njs] Shell: fixed unhandled rejected promises handling.

2024-01-23 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/6485ad23565e branches: changeset: 2270:6485ad23565e user: Dmitry Volyntsev date: Tue Jan 23 16:33:29 2024 -0800 description: Shell: fixed unhandled rejected promises handling. The issue was introduced in dffdf7c50dfc (not released yet

[njs] Moving out HostPromiseRejectionTracker from njs core.

2024-01-19 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/8aad26845b18 branches: changeset: 2269:8aad26845b18 user: Dmitry Volyntsev date: Thu Jan 18 18:03:35 2024 -0800 description: Moving out HostPromiseRejectionTracker from njs core. HostPromiseRejectionTracker should be implemented by host

[njs] Fixed tracking of unhandled rejected promises.

2024-01-19 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/da8b044e1c61 branches: changeset: 2268:da8b044e1c61 user: Dmitry Volyntsev date: Thu Jan 18 18:03:24 2024 -0800 description: Fixed tracking of unhandled rejected promises. Checking for unhandled promise rejections while looping for pending jobs

[njs] HTTP: avoiding arithmetic ops with NULL pointer in r.args getter.

2024-01-11 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/4fba78789fe4 branches: changeset: 2267:4fba78789fe4 user: Dmitry Volyntsev date: Thu Jan 11 15:13:47 2024 -0800 description: HTTP: avoiding arithmetic ops with NULL pointer in r.args getter. Found by UndefinedBehaviorSanitizer. diffstat

[njs] QueryString: avoiding arithmetic ops with NULL in parse().

2024-01-11 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/2b221f44efa6 branches: changeset: 2266:2b221f44efa6 user: Dmitry Volyntsev date: Thu Jan 11 15:13:43 2024 -0800 description: QueryString: avoiding arithmetic ops with NULL in parse(). Found by UndefinedBehaviorSanitizer. diffstat: external

[njs] Fixed potential buffer overread in String.prototype.match().

2024-01-09 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/476f7b3e617d branches: changeset: 2264:476f7b3e617d user: Dmitry Volyntsev date: Tue Jan 09 17:56:19 2024 -0800 description: Fixed potential buffer overread in String.prototype.match(). diffstat: src/njs_string.c | 2 +- 1 files changed, 1

Re: [PATCH] Satisfy UBSan in njs

2024-01-09 Thread Dmitry Volyntsev
On 1/3/24 4:55 PM, Ben Kallus wrote: When I run my nginx+njs application with UBSan enabled, I encounter a few instances of undefined behavior in njs: 1. A memcpy from NULL 2. A couple of offsets applied to NULL 3. A u32 assigned to nan 4. A u32 assigned to inf This patch adds checks to

[njs] Avoiding arithmetic ops with NULL in %TypedArray%.prototype.sort().

2024-01-09 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/50c587f74a09 branches: changeset: 2263:50c587f74a09 user: Dmitry Volyntsev date: Tue Jan 09 09:14:42 2024 -0800 description: Avoiding arithmetic ops with NULL in %TypedArray%.prototype.sort(). Found by UndefinedBehaviorSanitizer. diffstat

[njs] Avoiding casting Infinity to integer in String.fromCodePoint().

2024-01-09 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/f4cb0dc3e8ea branches: changeset: 2262:f4cb0dc3e8ea user: Dmitry Volyntsev date: Mon Jan 08 22:21:14 2024 -0800 description: Avoiding casting Infinity to integer in String.fromCodePoint(). Found by UndefinedBehaviorSanitizer. diffstat: src

[njs] Avoiding arithmetic operations with NULL pointer in TextDecoder().

2024-01-09 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/5d2a3da0674f branches: changeset: 2261:5d2a3da0674f user: Dmitry Volyntsev date: Mon Jan 08 22:20:19 2024 -0800 description: Avoiding arithmetic operations with NULL pointer in TextDecoder(). Found by UndefinedBehaviorSanitizer. diffstat

[njs] Avoiding casting NaN value to int64_t in njs.dump().

2024-01-09 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/c15a6129ade7 branches: changeset: 2260:c15a6129ade7 user: Dmitry Volyntsev date: Mon Jan 08 22:20:10 2024 -0800 description: Avoiding casting NaN value to int64_t in njs.dump(). Found by UndefinedBehaviorSanitizer. diffstat: src/njs_json.c

[njs] Avoiding pointer wraparound for padded integer specifier.

2024-01-09 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/e2c6451435a0 branches: changeset: 2259:e2c6451435a0 user: Dmitry Volyntsev date: Mon Jan 08 22:19:59 2024 -0800 description: Avoiding pointer wraparound for padded integer specifier. Previously, when integer was larger than the padded width

[njs] Ignoring UndefinedBehaviorSanitizer warnings where appropriate.

2024-01-08 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/0490f1ae4cf5 branches: changeset: 2258:0490f1ae4cf5 user: Dmitry Volyntsev date: Sun Jul 30 10:21:51 2023 +0100 description: Ignoring UndefinedBehaviorSanitizer warnings where appropriate. Prodded by David Carlier and Ben Kallus. diffstat

[njs] Fixed RegExp.prototype.exec() when second argument is absent.

2024-01-08 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/275d785ab5bf branches: changeset: 2257:275d785ab5bf user: Dmitry Volyntsev date: Mon Jan 08 16:40:42 2024 -0800 description: Fixed RegExp.prototype.exec() when second argument is absent. Previously, when the second argument is undefined, NaN

[njs] Fixed initialization of external prototypes with object entry.

2024-01-08 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/ee4d396aa418 branches: changeset: 2255:ee4d396aa418 user: Dmitry Volyntsev date: Mon Jan 08 16:40:42 2024 -0800 description: Fixed initialization of external prototypes with object entry. When external was NULL (for example, when

[njs] Improved array enumeration with length 0.

2024-01-08 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/41d0de3ad198 branches: changeset: 2256:41d0de3ad198 user: Dmitry Volyntsev date: Mon Jan 08 16:40:42 2024 -0800 description: Improved array enumeration with length 0. The fix eliminates an arithmetic operation with NULL pointer. Found

[njs] QueryString: fixed underflow in parse().

2024-01-08 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/c43745da92cd branches: changeset: 2254:c43745da92cd user: Dmitry Volyntsev date: Mon Jan 08 16:40:42 2024 -0800 description: QueryString: fixed underflow in parse(). Previously, njs_query_string_append() might be provided with invalid val_size

[njs] Fixed external values initialization in unit tests.

2024-01-08 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/9fadb2e9c6ea branches: changeset: 2253:9fadb2e9c6ea user: Dmitry Volyntsev date: Mon Jan 08 16:40:42 2024 -0800 description: Fixed external values initialization in unit tests. Since 0.8.0 modules can create their own constructors

[njs] Unifying hash function prototypes.

2024-01-08 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/721475693b80 branches: changeset: 2252:721475693b80 user: Dmitry Volyntsev date: Mon Jan 08 16:40:42 2024 -0800 description: Unifying hash function prototypes. This fixes UndefinedBehaviorSanitizer warning "call to function through po

[njs] Fixed Date constructor for overflows and with NaN values.

2024-01-08 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/57071ecadeb5 branches: changeset: 2251:57071ecadeb5 user: Dmitry Volyntsev date: Mon Jan 08 16:40:27 2024 -0800 description: Fixed Date constructor for overflows and with NaN values. Found by UndefinedBehaviorSanitizer. diffstat: src

[njs] Moving out logger from njs core.

2023-12-14 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/fc1001f6801b branches: changeset: 2249:fc1001f6801b user: Dmitry Volyntsev date: Thu Dec 14 22:32:02 2023 -0800 description: Moving out logger from njs core. Logger is not part of the JS runtime according to ECMAScript and should be implemented

[njs] Introduced njs_vm_set_module_loader().

2023-12-14 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/ad1a7ad3c715 branches: changeset: 2248:ad1a7ad3c715 user: Dmitry Volyntsev date: Wed Dec 13 18:38:47 2023 -0800 description: Introduced njs_vm_set_module_loader(). diffstat: external/njs_shell.c | 1 - nginx/ngx_http_js_module.c

[njs] Refactored asynchronous events.

2023-12-05 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/bc80bcb3102c branches: changeset: 2245:bc80bcb3102c user: Dmitry Volyntsev date: Tue Dec 05 08:54:18 2023 -0800 description: Refactored asynchronous events. To align njs with other JS engines, async events are removed from njs core

[njs] Modules: simplified setTimeout() timer callback.

2023-11-29 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/f64d1f9f19e5 branches: changeset: 2242:f64d1f9f19e5 user: Dmitry Volyntsev date: Wed Nov 29 18:43:45 2023 -0800 description: Modules: simplified setTimeout() timer callback. diffstat: nginx/ngx_js.c | 4 +--- 1 files changed, 1 insertions

[njs] Tests: detection when "xml" module is disabled.

2023-11-29 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/9a6a79e21822 branches: changeset: 2241:9a6a79e21822 user: Dmitry Volyntsev date: Wed Nov 29 18:43:37 2023 -0800 description: Tests: detection when "xml" module is disabled. diffstat: test/harness/compatXml.js

[njs] Remove njs_timer.c forgotten in the previous commit.

2023-11-27 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/d82a667c50af branches: changeset: 2239:d82a667c50af user: Dmitry Volyntsev date: Mon Nov 27 18:43:04 2023 -0800 description: Remove njs_timer.c forgotten in the previous commit. diffstat: src/njs_timer.c | 133

[njs] XML: fixed building with libxml2 2.12 and later.

2023-11-27 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/6a72cee054f6 branches: changeset: 2240:6a72cee054f6 user: Dmitry Volyntsev date: Mon Nov 27 18:43:36 2023 -0800 description: XML: fixed building with libxml2 2.12 and later. This fixes #684 issue on Github. diffstat: external

  1   2   3   4   5   6   7   8   9   10   >