Skip to content

Commit b4de48c

Browse files
Images: Remove redundant ModSecurity-nginx patch. (#13748)
Co-authored-by: marcel2012 <13705842+marcel2012@users.noreply.github.com>
1 parent 4e63f89 commit b4de48c

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

images/nginx/rootfs/build.sh

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -410,21 +410,6 @@ Include /etc/nginx/owasp-modsecurity-crs/rules/RESPONSE-980-CORRELATION.conf
410410
Include /etc/nginx/owasp-modsecurity-crs/rules/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf
411411
" > /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf
412412

413-
# NGINX compiles a small test program to check if an added module works as expected.
414-
#
415-
# ModSecurity-nginx provides 'printf("hello");' as a test, but newer versions of GCC,
416-
# as included in Alpine 3.22, do not allow implicit declaration of function 'printf':
417-
#
418-
# objs/autotest.c:7:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
419-
#
420-
# For this reason we replace 'printf("hello");' by 'msc_init();', which is always available.
421-
#
422-
# This fix is taken from a PR, that has been proposed to the ModSecurity-nginx project:
423-
#
424-
# https://github.com/owasp-modsecurity/ModSecurity-nginx/pull/275
425-
#
426-
sed -i "s/ngx_feature_test='printf(\"hello\");'/ngx_feature_test='msc_init();'/" $BUILD_PATH/ModSecurity-nginx/config
427-
428413
# build nginx
429414
cd "$BUILD_PATH/nginx-$NGINX_VERSION"
430415

0 commit comments

Comments
 (0)