git: 688221f7ff29 - main - www/nginx-module-njs: Update to 1.0.2

From: Jochen Neumeister <joneum_at_FreeBSD.org>
Date: Thu, 15 Oct 2026 11:17:43 UTC
The branch main has been updated by joneum:

URL: https://cgit.FreeBSD.org/ports/commit/?id=688221f7ff29978375f7ef45d8ea7d5220e3ebff

commit 688221f7ff29978375f7ef45d8ea7d5220e3ebff
Author:     Jochen Neumeister <joneum@FreeBSD.org>
AuthorDate: 2026-10-15 11:14:28 +0000
Commit:     Jochen Neumeister <joneum@FreeBSD.org>
CommitDate: 2026-10-15 11:15:55 +0000

    www/nginx-module-njs: Update to 1.0.2
    
    Fixes memory corruption in RegExp operations, crashes after a failed
    module compilation, and excessive resource usage when sorting huge sparse
    arrays.
    
    Both local patches are gone: njs 1.0.2 carries the indexed fast path fix
    for exotic objects itself.
    
    Sponsored by:   Netzkommune GmbH
---
 www/nginx-module-njs/Makefile                      |  3 +--
 www/nginx-module-njs/distinfo                      |  6 +++---
 www/nginx-module-njs/files/patch-src_njs__object.c | 11 ----------
 www/nginx-module-njs/files/patch-src_njs__value.c  | 24 ----------------------
 www/nginx-module-njs/pkg-plist                     |  2 ++
 5 files changed, 6 insertions(+), 40 deletions(-)

diff --git a/www/nginx-module-njs/Makefile b/www/nginx-module-njs/Makefile
index e5853a66cfb1..3d7ccf271189 100644
--- a/www/nginx-module-njs/Makefile
+++ b/www/nginx-module-njs/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	nginx-module-njs
-DISTVERSION=	1.0.1
-PORTREVISION=	1
+DISTVERSION=	1.0.2
 CATEGORIES=	www
 
 MAINTAINER=	joneum@FreeBSD.org
diff --git a/www/nginx-module-njs/distinfo b/www/nginx-module-njs/distinfo
index 851fdc925c80..12248a0527a7 100644
--- a/www/nginx-module-njs/distinfo
+++ b/www/nginx-module-njs/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1788447816
-SHA256 (nginx-njs-1.0.1_GH0.tar.gz) = 74372cfcbf11eb0a71bc555e19dc785f61d561d5663d254474da6c8c9e50a6a7
-SIZE (nginx-njs-1.0.1_GH0.tar.gz) = 1003218
+TIMESTAMP = 1792056913
+SHA256 (nginx-njs-1.0.2_GH0.tar.gz) = 84a114499fa6878d3ec52b99c1cf2874a91eb0d915408f418a2b1279519f09ae
+SIZE (nginx-njs-1.0.2_GH0.tar.gz) = 1071822
diff --git a/www/nginx-module-njs/files/patch-src_njs__object.c b/www/nginx-module-njs/files/patch-src_njs__object.c
deleted file mode 100644
index d3a66887340c..000000000000
--- a/www/nginx-module-njs/files/patch-src_njs__object.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/njs_object.c.orig	2026-08-20 18:32:42 UTC
-+++ src/njs_object.c
-@@ -1140,7 +1140,7 @@ njs_object_own_enumerate_object(njs_vm_t *vm, const nj
-         }
- 
-         entry = NULL;
--        njs_set_object(&value, (njs_object_t *) object);
-+        njs_set_type_object(&value, (njs_object_t *) object, object->type);
- 
-         for (i = 0; i< items_sorted->length; i++) {
-             ret = njs_value_property_val(vm, &value, &items_sorted->start[i],
diff --git a/www/nginx-module-njs/files/patch-src_njs__value.c b/www/nginx-module-njs/files/patch-src_njs__value.c
deleted file mode 100644
index 84b4cd672d74..000000000000
--- a/www/nginx-module-njs/files/patch-src_njs__value.c
+++ /dev/null
@@ -1,24 +0,0 @@
---- src/njs_value.c.orig	2026-08-20 18:32:42 UTC
-+++ src/njs_value.c
-@@ -1075,9 +1075,7 @@ njs_value_property(njs_vm_t *vm, njs_value_t *value, u
-             return NJS_OK;
-         }
- 
--        if (njs_slow_path(!(njs_is_object(value)
--                            && njs_object(value)->fast_array)))
--        {
-+        if (njs_slow_path(!njs_is_fast_array(value))) {
-             goto slow_path;
-         }
- 
-@@ -1194,9 +1192,7 @@ njs_value_property_set(njs_vm_t *vm, njs_value_t *valu
-             return NJS_OK;
-         }
- 
--        if (njs_slow_path(!(njs_is_object(value)
--                            && njs_object(value)->fast_array)))
--        {
-+        if (njs_slow_path(!njs_is_fast_array(value))) {
-             goto slow_path;
-         }
- 
diff --git a/www/nginx-module-njs/pkg-plist b/www/nginx-module-njs/pkg-plist
index 308380cdbb24..fcff68f0dea6 100644
--- a/www/nginx-module-njs/pkg-plist
+++ b/www/nginx-module-njs/pkg-plist
@@ -188,9 +188,11 @@ share/nginx/modules/nginx-module-njs/src/qjs.h
 share/nginx/modules/nginx-module-njs/src/qjs_buffer.c
 share/nginx/modules/nginx-module-njs/src/quickjs_compat.h
 share/nginx/modules/nginx-module-njs/src/test/flathsh_unit_test.c
+share/nginx/modules/nginx-module-njs/src/test/mp_unit_test.c
 share/nginx/modules/nginx-module-njs/src/test/njs_benchmark.c
 share/nginx/modules/nginx-module-njs/src/test/njs_externals_test.c
 share/nginx/modules/nginx-module-njs/src/test/njs_externals_test.h
+share/nginx/modules/nginx-module-njs/src/test/njs_test262.c
 share/nginx/modules/nginx-module-njs/src/test/njs_unit_test.c
 share/nginx/modules/nginx-module-njs/src/test/random_unit_test.c
 share/nginx/modules/nginx-module-njs/src/test/rbtree_unit_test.c