Closed pgnd closed 2 years ago
@petecooper
from nginx-devel ML,
https://forum.nginx.org/read.php?29,293178,293179#msg-293179
the second issue, above, seems to be the relevant one here.
and,
"The NAXSI bug mentioned in the second commit needs to be fixed before it will be possible to build NAXSI with PCRE2."
"The" bug refers to incorrect usage of PCRE_MULTILINE
.
but, afaict, is not yet filed/open as an existing issue here @ naxsi
same issue. nginx: 1.21.5 pcre2: 10.39
../modules/ngx_http_naxsi_module/naxsi_src/naxsi_runtime.c
../modules/ngx_http_naxsi_module/naxsi_src/naxsi_runtime.c: In function 'ngx_http_process_basic_rule_buffer':
../modules/ngx_http_naxsi_module/naxsi_src/naxsi_runtime.c:205:61: error: invalid use of incomplete typedef 'ngx_regex_t' {aka 'struct pcre2_real_code_8'}
205 | (tmp_idx < len && (match = pcre_exec(rl->br->rx->regex->code,
| ^~
../modules/ngx_http_naxsi_module/naxsi_src/naxsi_runtime.c: In function 'ngx_http_naxsi_pcre_wrapper':
../modules/ngx_http_naxsi_module/naxsi_src/naxsi_runtime.c:500:30: error: invalid use of incomplete typedef 'ngx_regex_t' {aka 'struct pcre2_real_code_8'}
500 | match = pcre_exec(rx->regex->code, 0, (const char*)str, len, 0, 0, captures, 1);
| ^~
make[1]: *** [objs/Makefile:2297: objs/addon/naxsi_src/naxsi_runtime.o] Error 1
make: *** [Makefile:10: build] Error 2
same issue. nginx: 1.22.0 pcre2: 10.39
-o objs/addon/naxsi_src/naxsi_runtime.o \
/src/naxsi/naxsi_src/naxsi_runtime.c
/src/naxsi/naxsi_src/naxsi_runtime.c: In function 'ngx_http_process_basic_rule_buffer':
/src/naxsi/naxsi_src/naxsi_runtime.c:205:61: error: invalid use of incomplete typedef 'ngx_regex_t' {aka 'struct pcre2_real_code_8'}
205 | (tmp_idx < len && (match = pcre_exec(rl->br->rx->regex->code,
| ^~
/src/naxsi/naxsi_src/naxsi_runtime.c: In function 'ngx_http_naxsi_pcre_wrapper':
/src/naxsi/naxsi_src/naxsi_runtime.c:500:30: error: invalid use of incomplete typedef 'ngx_regex_t' {aka 'struct pcre2_real_code_8'}
500 | match = pcre_exec(rx->regex->code, 0, (const char*)str, len, 0, 0, captures, 1);
| ^~
make[1]: *** [objs/Makefile:3170: objs/addon/naxsi_src/naxsi_runtime.o] Error 1
make: *** [Makefile:16: modules] Error 2
same here:
make[1]: [objs/Makefile:2244: objs/addon/naxsi_src/naxsi_runtime.o] Error 1 make[1]: Waiting for unfinished jobs.... make[1]: Leaving directory '/rpm/nginx-1.22.0' make: *** [Makefile:10: build] Error 2
For what's worth, we are using this patch on Arch to build this module: https://github.com/archlinux/svntogit-community/blob/packages/nginx-mod-naxsi/trunk/587-pcre2.patch
I do not know why this is still open but it was fixed: https://github.com/wargio/naxsi/commit/9e06c5f53b2e393e40e9df7746a7b8bc4c2abfa4
Hello,
Could you please release this fix 👍 ?
Hello,
Could you please release this fix +1 ?
It is fixed: https://github.com/wargio/naxsi
Sorry, it wasn't clear enough. Thank you for fixing this 🙏 . My question is more about making a new release, version 1.4, including this fix. 🚀
Not going to happen in this repository. This repository is considered abandoned thus you should use mine.
Building/packaging latest nginx-1.21.5
on Fedora 35, with PCRE2,
and only PCRE2 enabled,
fails,
at,