Update libinjection to version v3.9.2-92-gb9fcaaf

This commit is contained in:
Eduardo Arias 2024-05-24 10:46:11 -03:00
parent 2fd45f870b
commit 7732b5e8f3
8 changed files with 39 additions and 19 deletions

View File

@ -57,8 +57,11 @@ jobs:
sudo apt-get install -y libgeoip-dev:${{ matrix.platform.arch }} \ sudo apt-get install -y libgeoip-dev:${{ matrix.platform.arch }} \
libfuzzy-dev:${{ matrix.platform.arch }} libfuzzy-dev:${{ matrix.platform.arch }}
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: - name: get submodules
submodules: true # get submodules manually for git describe to work during build
run: |
git submodule init
git submodule update
- name: build.sh - name: build.sh
run: ./build.sh run: ./build.sh
- name: configure - name: configure
@ -105,8 +108,11 @@ jobs:
bison \ bison \
flex flex
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: - name: get submodules
submodules: true # get submodules manually for git describe to work during build
run: |
git submodule init
git submodule update
- name: build.sh - name: build.sh
run: ./build.sh run: ./build.sh
- name: configure - name: configure
@ -135,8 +141,11 @@ jobs:
- {label: "wo libxml", opt: "-WITHOUT_LIBXML2=ON" } - {label: "wo libxml", opt: "-WITHOUT_LIBXML2=ON" }
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: - name: Get submodules
submodules: true # get submodules manually for git describe to work during build
run: |
git submodule init
git submodule update
- name: Install Conan - name: Install Conan
run: | run: |
pip3 install conan --upgrade pip3 install conan --upgrade

View File

@ -30,7 +30,21 @@ endif()
project(libinjection C) project(libinjection C)
add_library(libinjection STATIC ${BASE_DIR}/others/libinjection/src/libinjection_sqli.c ${BASE_DIR}/others/libinjection/src/libinjection_xss.c ${BASE_DIR}/others/libinjection/src/libinjection_html5.c) set(LIBINJECTION_DIR ${BASE_DIR}/others/libinjection)
add_library(libinjection STATIC ${LIBINJECTION_DIR}/src/libinjection_sqli.c ${LIBINJECTION_DIR}/src/libinjection_xss.c ${LIBINJECTION_DIR}/src/libinjection_html5.c)
# get libinjection version with git describe
execute_process(
COMMAND git describe
WORKING_DIRECTORY ${LIBINJECTION_DIR}
OUTPUT_VARIABLE LIBINJECTION_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message("-- Detecting libinjection version - ${LIBINJECTION_VERSION}")
target_compile_definitions(libinjection PRIVATE LIBINJECTION_VERSION="${LIBINJECTION_VERSION}")
# mbedtls # mbedtls

View File

@ -75,6 +75,7 @@ AC_MSG_ERROR([\
fi fi
# Libinjection version # Libinjection version
AC_DEFUN([LIBINJECTION_VERSION], m4_esyscmd_s(cd "others/libinjection" && git describe && cd ../..)) AC_DEFUN([LIBINJECTION_VERSION], m4_esyscmd_s(cd "others/libinjection" && git describe && cd ../..))
AC_SUBST([LIBINJECTION_VERSION])
# SecLang test version # SecLang test version
AC_DEFUN([SECLANG_TEST_VERSION], m4_esyscmd_s(cd "test/test-cases/secrules-language-tests" && git log -1 --format="%h" --abbrev-commit && cd ../../..)) AC_DEFUN([SECLANG_TEST_VERSION], m4_esyscmd_s(cd "test/test-cases/secrules-language-tests" && git log -1 --format="%h" --abbrev-commit && cd ../../..))

View File

@ -1,10 +1,14 @@
noinst_LTLIBRARIES = libinjection.la libmbedtls.la noinst_LTLIBRARIES = libinjection.la libmbedtls.la
libinjection_la_SOURCES = \ libinjection_la_SOURCES = \
libinjection/src/libinjection_html5.c \ libinjection/src/libinjection_html5.c \
libinjection/src/libinjection_sqli.c \ libinjection/src/libinjection_sqli.c \
libinjection/src/libinjection_xss.c libinjection/src/libinjection_xss.c
libinjection_la_CFLAGS = -D LIBINJECTION_VERSION=\"${LIBINJECTION_VERSION}\"
libinjection_la_LIBADD =
noinst_HEADERS = \ noinst_HEADERS = \
libinjection/src/libinjection.h \ libinjection/src/libinjection.h \
libinjection/src/libinjection_html5.h \ libinjection/src/libinjection_html5.h \

@ -1 +1 @@
Subproject commit bfba51f5af8f1f6cf5d6c4bf862f1e2474e018e3 Subproject commit b9fcaaf9e50e9492807b23ffcc6af46ee1f203b9

View File

@ -19,7 +19,7 @@
#include <list> #include <list>
#include "src/operators/operator.h" #include "src/operators/operator.h"
#include "others/libinjection/src/libinjection.h" #include "libinjection/src/libinjection.h"
namespace modsecurity { namespace modsecurity {
namespace operators { namespace operators {

View File

@ -18,7 +18,7 @@
#include <string> #include <string>
#include "src/operators/operator.h" #include "src/operators/operator.h"
#include "others/libinjection/src/libinjection.h" #include "libinjection/src/libinjection.h"
namespace modsecurity { namespace modsecurity {

View File

@ -1,15 +1,7 @@
// //
// Ignore libinjection related stuff. // Ignore libinjection related stuff.
// //
*:others/libinjection/src/libinjection_html5.c *:others/libinjection/src/*
*:others/libinjection/src/libinjection_sqli.c
*:others/libinjection/src/libinjection_xss.c
*:others/libinjection/src/reader.c
*:others/libinjection/src/sqli_cli.c
*:others/libinjection/src/testdriver.c
*:others/libinjection/src/test_speed_sqli.c
*:others/libinjection/src/test_speed_xss.c
// //
// Lets ignore mbedtls. // Lets ignore mbedtls.