git: 29bb1a5806a6 - main - www/nginx: Moved Naxsi module
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 13 Jul 2023 17:01:01 UTC
The branch main has been updated by joneum: URL: https://cgit.FreeBSD.org/ports/commit/?id=29bb1a5806a6e6084bbfb9b5856adac87e6d12ba commit 29bb1a5806a6e6084bbfb9b5856adac87e6d12ba Author: Franco Fichtner <franco@opnsense.org> AuthorDate: 2023-07-13 16:57:49 +0000 Commit: Jochen Neumeister <joneum@FreeBSD.org> CommitDate: 2023-07-13 17:00:39 +0000 www/nginx: Moved Naxsi module Moved the 3rd Madule Naxsi to a activ repository PR: 271963 Redorted by: David Armstrong <freebsd-bugzilla@b-interactive.com.au> Sponsored by: Netzkommune GmbH --- www/nginx/Makefile | 13 +++++++++++-- www/nginx/Makefile.extmod | 7 ++++--- www/nginx/distinfo | 6 +++--- www/nginx/files/extra-patch-naxsi_runtime.c | 23 ----------------------- 4 files changed, 18 insertions(+), 31 deletions(-) diff --git a/www/nginx/Makefile b/www/nginx/Makefile index ed76a30f3a42..55ea3ebe9cd2 100644 --- a/www/nginx/Makefile +++ b/www/nginx/Makefile @@ -1,6 +1,6 @@ PORTNAME= nginx PORTVERSION= 1.24.0 -PORTREVISION?= 6 +PORTREVISION?= 7 PORTEPOCH= 3 CATEGORIES= www MASTER_SITES= https://nginx.org/download/ \ @@ -266,6 +266,11 @@ pre-everything:: .endif @${ECHO_MSG} +post-extract-NAXSI-on: + @${MKDIR} ${WRKDIR}/naxsi-${NAXSI_NGINX_VER} + @${MV} ${WRKDIR}/naxsi_rules ${WRKDIR}/naxsi_src \ + ${WRKDIR}/naxsi-${NAXSI_NGINX_VER} + pre-patch-HTTPV3-on: @${MV} ${WRKSRC}/README ${WRKSRC}/README.1st @@ -307,6 +312,10 @@ post-patch-HTTP_ZIP-on: post-patch-ICONV-on: @${REINPLACE_CMD} 's!%%PREFIX%%!${LOCALBASE}!g' ${WRKSRC_iconv}/config +post-patch-NAXSI-on: + @${REINPLACE_CMD} 's!MSIZE!TOK_MSIZE!g' \ + ${WRKSRC_naxsi}/naxsi_src/libinjection/src/libinjection_sqli.c + post-patch-PASSENGER-on: @${REINPLACE_CMD} \ '177,179s!true!false!' \ @@ -370,7 +379,7 @@ do-install-LINK-on: do-install-NAXSI-on: ${INSTALL_DATA} \ - ${WRKDIR}/naxsi-${NAXSI_NGINX_VER}/naxsi_config/naxsi_core.rules \ + ${WRKDIR}/naxsi-${NAXSI_NGINX_VER}/naxsi_rules/naxsi_core.rules \ ${STAGEDIR}${ETCDIR} .endif diff --git a/www/nginx/Makefile.extmod b/www/nginx/Makefile.extmod index 2483f2c97a99..5782924cb8f0 100644 --- a/www/nginx/Makefile.extmod +++ b/www/nginx/Makefile.extmod @@ -242,10 +242,11 @@ MODSECURITY3_LIB_DEPENDS= libmodsecurity.so:security/modsecurity3 MODSECURITY3_GH_TUPLE= SpiderLabs:ModSecurity-nginx:v1.0.3:modsecurity3 MODSECURITY3_VARS= DSO_EXTMODS+=modsecurity3 -NAXSI_NGINX_VER= 29793dc -NAXSI_GH_TUPLE= nbs-system:naxsi:${NAXSI_NGINX_VER}:naxsi +NAXSI_NGINX_VER= 1.4 +NAXSI_MASTER_SITES= https://www.github.com/wargio/naxsi/releases/download/1.4/:naxsi +NAXSI_DISTFILES= naxsi-${NAXSI_NGINX_VER}-src-with-deps.tar.gz:naxsi NAXSI_VARS= DSO_EXTMODS+=naxsi NAXSI_SUBDIR=/naxsi_src -NAXSI_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-naxsi_runtime.c +WRKSRC_naxsi= ${WRKDIR}/naxsi-${NAXSI_NGINX_VER} NJS_GH_TUPLE= nginx:njs:0.7.12:njs NJS_VARS= DSO_EXTMODS+=njs NJS_SUBDIR=/nginx diff --git a/www/nginx/distinfo b/www/nginx/distinfo index 95601fb73b4b..5a752448dc29 100644 --- a/www/nginx/distinfo +++ b/www/nginx/distinfo @@ -1,4 +1,4 @@ -TIMESTAMP = 1684343308 +TIMESTAMP = 1687522128 SHA256 (nginx-1.24.0.tar.gz) = 77a2541637b92a621e3ee76776c8b7b40cf6d707e69ba53a940283e30ff2f55d SIZE (nginx-1.24.0.tar.gz) = 1112471 SHA256 (chobits-ngx_http_proxy_connect_module-75febef_GH0.tar.gz) = 6169361f31607af0ec8c78b356e62c2aeb128649161d688d7ea92f4d2c1c39f9 @@ -9,6 +9,8 @@ SHA256 (nginx_mod_h264_streaming-2.2.7.tar.gz) = 6d974ba630cef59de1f60996c66b401 SIZE (nginx_mod_h264_streaming-2.2.7.tar.gz) = 44012 SHA256 (ngx_http_redis-0.3.9.tar.gz) = 21f87540f0a44b23ffa5df16fb3d788bc90803b255ef14f9c26e3847a6f26f46 SIZE (ngx_http_redis-0.3.9.tar.gz) = 13051 +SHA256 (naxsi-1.4-src-with-deps.tar.gz) = c4b9d752fbb70fa40fcc17aaaef6e0f19071a0e77ff74cac4b3da57a67868684 +SIZE (naxsi-1.4-src-with-deps.tar.gz) = 2274095 SHA256 (passenger-6.0.17.tar.gz) = 385559ed1d78eb83165222d568721dcc4222bb57c1939811ecd2c4ef33937ba7 SIZE (passenger-6.0.17.tar.gz) = 8422867 SHA256 (msva-nginx_ajp_module-fcbb2cc_GH0.tar.gz) = 522e94c59f5783f281d868ede2adf325bf2f8ffb9e62cf8451d4b9ac0516916c @@ -107,8 +109,6 @@ SHA256 (openresty-memc-nginx-module-v0.19_GH0.tar.gz) = 8c2bdbe875e4f5225d0778bf SIZE (openresty-memc-nginx-module-v0.19_GH0.tar.gz) = 34654 SHA256 (SpiderLabs-ModSecurity-nginx-v1.0.3_GH0.tar.gz) = 32a42256616cc674dca24c8654397390adff15b888b77eb74e0687f023c8751b SIZE (SpiderLabs-ModSecurity-nginx-v1.0.3_GH0.tar.gz) = 34063 -SHA256 (nbs-system-naxsi-29793dc_GH0.tar.gz) = 579df0e50ff32464f7bb152df9d93ea18c05c4aa3966ec4d8c603b5dd629be08 -SIZE (nbs-system-naxsi-29793dc_GH0.tar.gz) = 236932 SHA256 (nginx-njs-0.7.12_GH0.tar.gz) = 7a75a39022dfb58dbf461053903a07cc48dd4942f7d82a46601819c1b0077687 SIZE (nginx-njs-0.7.12_GH0.tar.gz) = 662554 SHA256 (opentracing-contrib-nginx-opentracing-v0.24.0_GH0.tar.gz) = 5328c5f37e0615b5252aed51b9cd40f3d14989d995ad54134076aeda4ab9b280 diff --git a/www/nginx/files/extra-patch-naxsi_runtime.c b/www/nginx/files/extra-patch-naxsi_runtime.c deleted file mode 100644 index c08dd1f92540..000000000000 --- a/www/nginx/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 - */