summaryrefslogtreecommitdiff
path: root/www/nginx-devel/files
diff options
context:
space:
mode:
authorSergey A. Osokin <osa@FreeBSD.org>2023-09-27 10:30:56 -0400
committerSergey A. Osokin <osa@FreeBSD.org>2023-09-27 10:34:40 -0400
commit44fdcb4c710f8980f1df24cd426abd4fb8dcf59f (patch)
tree31c2db18b31c617966df4156aa08b7a2c99dd7a2 /www/nginx-devel/files
parentx11/xdg-desktop-portal-hyprland: unbreak with Clang after 4ce3b4b71dcb (diff)
www/nginx-devel: update third-party naxsi module to 1.5 (+)
Change the distribution point to GH/wargio due to inactivity in GH/nbs-system. Update patches. Bump PORTREVISION.
Diffstat (limited to 'www/nginx-devel/files')
-rw-r--r--www/nginx-devel/files/extra-patch-naxsi-libinjection__sqli_c13
-rw-r--r--www/nginx-devel/files/extra-patch-naxsi_config26
-rw-r--r--www/nginx-devel/files/extra-patch-naxsi_runtime.c23
3 files changed, 39 insertions, 23 deletions
diff --git a/www/nginx-devel/files/extra-patch-naxsi-libinjection__sqli_c b/www/nginx-devel/files/extra-patch-naxsi-libinjection__sqli_c
new file mode 100644
index 000000000000..9aeec390a0de
--- /dev/null
+++ b/www/nginx-devel/files/extra-patch-naxsi-libinjection__sqli_c
@@ -0,0 +1,13 @@
+--- ../libinjection-51f3a96/src/libinjection_sqli.c.orig 2023-05-30 15:47:57.333208000 -0400
++++ ../libinjection-51f3a96/src/libinjection_sqli.c 2023-05-30 15:49:52.273873000 -0400
+@@ -305,8 +303,8 @@
+ static void st_assign(stoken_t * st, const char stype,
+ size_t pos, size_t len, const char* value)
+ {
+- const size_t MSIZE = LIBINJECTION_SQLI_TOKEN_SIZE;
+- size_t last = len < MSIZE ? len : (MSIZE - 1);
++ const size_t NAXSI_MSIZE = LIBINJECTION_SQLI_TOKEN_SIZE;
++ size_t last = len < NAXSI_MSIZE ? len : (NAXSI_MSIZE - 1);
+ st->type = (char) stype;
+ st->pos = pos;
+ st->len = last;
diff --git a/www/nginx-devel/files/extra-patch-naxsi_config b/www/nginx-devel/files/extra-patch-naxsi_config
new file mode 100644
index 000000000000..a73cf8f4e085
--- /dev/null
+++ b/www/nginx-devel/files/extra-patch-naxsi_config
@@ -0,0 +1,26 @@
+--- ../naxsi-1.5/naxsi_src/config.orig 2023-09-27 09:43:18.644606000 -0400
++++ ../naxsi-1.5/naxsi_src/config 2023-09-27 09:44:37.585970000 -0400
+@@ -24,11 +24,6 @@
+ "
+
+ # try to use libinjection as system library
+-LIBINJECTION_CFLAGS="$(pkg-config --cflags libinjection)"
+-LIBINJECTION_LIBS="$(pkg-config --libs libinjection)"
+-LIBINJECTION_FOUND="$?"
+-
+-if [ "$LIBINJECTION_FOUND" != "0" ]; then
+ if [ ! -d "$ngx_addon_dir/libinjection/src/" ]; then
+ echo "Cannot find 'libinjection' submodule."
+ exit 1;
+@@ -43,11 +38,6 @@
+ naxsi_sources="$naxsi_sources $ngx_addon_dir/libinjection_ngxbuild/$src_file"
+ done;
+ CFLAGS="$CFLAGS -DLIBINJECTION_VERSION=0 -I$ngx_addon_dir/libinjection_ngxbuild/"
+-else
+- echo "Using system libinjection"
+- CFLAGS="$CFLAGS $LIBINJECTION_CFLAGS"
+- ngx_feature_libs="$LIBINJECTION_LIBS"
+-fi
+
+ # NGINX module condfiguration.
+ ngx_addon_name=naxsi
diff --git a/www/nginx-devel/files/extra-patch-naxsi_runtime.c b/www/nginx-devel/files/extra-patch-naxsi_runtime.c
deleted file mode 100644
index c08dd1f92540..000000000000
--- a/www/nginx-devel/files/extra-patch-naxsi_runtime.c
+++ /dev/null
@@ -1,23 +0,0 @@
---- ../naxsi-29793dc/naxsi_src/naxsi_runtime.c.orig 2022-07-10 18:11:39.685243000 -0400
-+++ ../naxsi-29793dc/naxsi_src/naxsi_runtime.c 2022-07-10 18:14:53.935554000 -0400
-@@ -9,6 +9,11 @@
- #include "naxsi_macros.h"
- #include "naxsi_net.h"
-
-+#if (NGX_PCRE2)
-+#include <pcre2.h>
-+#else
-+#include <pcre.h>
-+#endif
- /* used to store locations during the configuration time.
- then, accessed by the hashtable building feature during "init" time. */
-
-@@ -181,7 +186,7 @@
- unsigned char*
- ngx_utf8_check(ngx_str_t* str);
-
--#if defined nginx_version && (nginx_version >= 1021005)
-+#if (NGX_PCRE2)
- /*
- * variables to use pcre2
- */