mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Merge branch 'SpiderLabs:v2/master' into v2/master
This commit is contained in:
4
CHANGES
4
CHANGES
@@ -1,6 +1,10 @@
|
||||
DD mmm YYYY - 2.9.x (to be released)
|
||||
-------------------
|
||||
|
||||
* Allow lua version 5.4
|
||||
[Issue #2996 - @3eka, @martinhsv]
|
||||
* Configure: do not check for pcre1 if pcre2 requested
|
||||
[Issue #2975 - @zhaoshikui, @martinhsv]
|
||||
* Check return code of apr_procattr_io_set()
|
||||
[Issue #2958 - @marcstern]
|
||||
* Do not escape special chars in rx pattern with macro
|
||||
|
@@ -429,12 +429,12 @@ int lua_execute(msc_script *script, char *param, modsec_rec *msr, msre_rule *rul
|
||||
#else
|
||||
|
||||
/* Create new state. */
|
||||
#if LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503 || LUA_VERSION_NUM == 501
|
||||
#if LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503 || LUA_VERSION_NUM == 504 || LUA_VERSION_NUM == 501
|
||||
L = luaL_newstate();
|
||||
#elif LUA_VERSION_NUM == 500
|
||||
L = lua_open();
|
||||
#else
|
||||
#error We are only tested under Lua 5.0, 5.1, 5.2, or 5.3.
|
||||
#error We are only tested under Lua 5.0, 5.1, 5.2, 5.3, or 5.4.
|
||||
#endif
|
||||
luaL_openlibs(L);
|
||||
|
||||
@@ -459,10 +459,10 @@ int lua_execute(msc_script *script, char *param, modsec_rec *msr, msre_rule *rul
|
||||
/* Register functions. */
|
||||
#if LUA_VERSION_NUM == 500 || LUA_VERSION_NUM == 501
|
||||
luaL_register(L, "m", mylib);
|
||||
#elif LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503
|
||||
#elif LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503 || LUA_VERSION_NUM == 504
|
||||
luaL_setfuncs(L, mylib, 0);
|
||||
#else
|
||||
#error We are only tested under Lua 5.0, 5.1, 5.2, or 5.3.
|
||||
#error We are only tested under Lua 5.0, 5.1, 5.2, 5.3, or 5.4.
|
||||
#endif
|
||||
|
||||
lua_setglobal(L, "m");
|
||||
|
@@ -21,16 +21,19 @@ AC_ARG_WITH(
|
||||
[test_paths="${with_pcre}"],
|
||||
[test_paths="/usr/local/libpcre /usr/local/pcre /usr/local /opt/libpcre /opt/pcre /opt /usr"])
|
||||
|
||||
AC_MSG_CHECKING([for libpcre config script])
|
||||
|
||||
dnl # Determine pcre lib directory
|
||||
if test -z "${with_pcre}"; then
|
||||
test_paths="/usr/local/pcre /usr/local /usr"
|
||||
if test "x${with_pcre2}" != "x" && test "x${with_pcre2}" != "xno"; then
|
||||
AC_MSG_NOTICE([pcre2 specified; omitting check for pcre])
|
||||
else
|
||||
test_paths="${with_pcre}"
|
||||
fi
|
||||
AC_MSG_CHECKING([for libpcre config script])
|
||||
|
||||
for x in ${test_paths}; do
|
||||
dnl # Determine pcre lib directory
|
||||
if test -z "${with_pcre}"; then
|
||||
test_paths="/usr/local/pcre /usr/local /usr"
|
||||
else
|
||||
test_paths="${with_pcre}"
|
||||
fi
|
||||
|
||||
for x in ${test_paths}; do
|
||||
dnl # Determine if the script was specified and use it directly
|
||||
if test ! -d "$x" -a -e "$x"; then
|
||||
PCRE_CONFIG=$x
|
||||
@@ -53,9 +56,9 @@ for x in ${test_paths}; do
|
||||
if test -n "$pcre_path"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
if test -n "${pcre_path}"; then
|
||||
if test -n "${pcre_path}"; then
|
||||
if test "${pcre_path}" != "no"; then
|
||||
PCRE_CONFIG="${pcre_path}/${PCRE_CONFIG}"
|
||||
fi
|
||||
@@ -68,22 +71,23 @@ if test -n "${pcre_path}"; then
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(pcre LDADD: $PCRE_LDADD); fi
|
||||
PCRE_LD_PATH="/`${PCRE_CONFIG} --libs | cut -d'/' -f2,3,4,5,6 | cut -d ' ' -f1`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(pcre PCRE_LD_PATH: $PCRE_LD_PATH); fi
|
||||
else
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(PCRE_CONFIG)
|
||||
AC_SUBST(PCRE_VERSION)
|
||||
AC_SUBST(PCRE_CPPFLAGS)
|
||||
AC_SUBST(PCRE_CFLAGS)
|
||||
AC_SUBST(PCRE_LDFLAGS)
|
||||
AC_SUBST(PCRE_LDADD)
|
||||
AC_SUBST(PCRE_LD_PATH)
|
||||
AC_SUBST(PCRE_CONFIG)
|
||||
AC_SUBST(PCRE_VERSION)
|
||||
AC_SUBST(PCRE_CPPFLAGS)
|
||||
AC_SUBST(PCRE_CFLAGS)
|
||||
AC_SUBST(PCRE_LDFLAGS)
|
||||
AC_SUBST(PCRE_LDADD)
|
||||
AC_SUBST(PCRE_LD_PATH)
|
||||
|
||||
if test -z "${PCRE_VERSION}"; then
|
||||
if test -z "${PCRE_VERSION}"; then
|
||||
AC_MSG_NOTICE([*** pcre library not found.])
|
||||
else
|
||||
else
|
||||
AC_MSG_NOTICE([using pcre v${PCRE_VERSION}])
|
||||
ifelse([$1], , , $1)
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
Reference in New Issue
Block a user