Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@ MSC_ARG_ENABLE_BOOL([mutex-on-pm], [Treat pm operations as critical section], [f

if test $buildParser = true; then
AC_PROG_YACC
AS_IF([test "x$YACC" = "xbison -y"], [
YACC="bison"
])
AC_SUBST([YACC])

AC_PROG_LEX(noyywrap)
AC_PATH_PROG([FLEX], [flex])
test "x$FLEX" = "x" && AC_MSG_ERROR([flex is needed to build ModSecurity])
Expand Down
14 changes: 13 additions & 1 deletion headers/modsecurity/transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ class TransactionAnchoredVariables {
m_variableArgs(t, "ARGS"),
m_variableArgsGet(t, "ARGS_GET"),
m_variableArgsPost(t, "ARGS_POST"),
m_variableArgsRaw(t, "ARGS_RAW"),
m_variableArgsGetRaw(t, "ARGS_GET_RAW"),
m_variableArgsPostRaw(t, "ARGS_POST_RAW"),
m_variableFilesSizes(t, "FILES_SIZES"),
m_variableFilesNames(t, "FILES_NAMES"),
m_variableFilesTmpContent(t, "FILES_TMP_CONTENT"),
Expand All @@ -208,7 +211,10 @@ class TransactionAnchoredVariables {
m_variableOffset(0),
m_variableArgsNames("ARGS_NAMES", &m_variableArgs),
m_variableArgsGetNames("ARGS_GET_NAMES", &m_variableArgsGet),
m_variableArgsPostNames("ARGS_POST_NAMES", &m_variableArgsPost)
m_variableArgsPostNames("ARGS_POST_NAMES", &m_variableArgsPost),
m_variableArgsNamesRaw("ARGS_NAMES_RAW", &m_variableArgsRaw),
m_variableArgsGetNamesRaw("ARGS_GET_NAMES_RAW", &m_variableArgsGetRaw),
m_variableArgsPostNamesRaw("ARGS_POST_NAMES_RAW", &m_variableArgsPostRaw)
{ }

AnchoredSetVariable m_variableRequestHeadersNames;
Expand Down Expand Up @@ -274,6 +280,9 @@ class TransactionAnchoredVariables {
AnchoredSetVariable m_variableArgs;
AnchoredSetVariable m_variableArgsGet;
AnchoredSetVariable m_variableArgsPost;
AnchoredSetVariable m_variableArgsRaw;
AnchoredSetVariable m_variableArgsGetRaw;
AnchoredSetVariable m_variableArgsPostRaw;
AnchoredSetVariable m_variableFilesSizes;
AnchoredSetVariable m_variableFilesNames;
AnchoredSetVariable m_variableFilesTmpContent;
Expand All @@ -295,6 +304,9 @@ class TransactionAnchoredVariables {
AnchoredSetVariableTranslationProxy m_variableArgsNames;
AnchoredSetVariableTranslationProxy m_variableArgsGetNames;
AnchoredSetVariableTranslationProxy m_variableArgsPostNames;
AnchoredSetVariableTranslationProxy m_variableArgsNamesRaw;
AnchoredSetVariableTranslationProxy m_variableArgsGetNamesRaw;
AnchoredSetVariableTranslationProxy m_variableArgsPostNamesRaw;
};

class TransactionSecMarkerManagement {
Expand Down
13 changes: 13 additions & 0 deletions src/args_names_raw.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifndef SRC_VARIABLES_ARGS_NAMES_RAW_H_
#define SRC_VARIABLES_ARGS_NAMES_RAW_H_

#include "src/variables/variable.h"

namespace modsecurity {
class Transaction;
namespace variables {
DEFINE_VARIABLE_DICT(ArgsNamesRaw, ARGS_NAMES_RAW, m_variableArgsNamesRaw)
} // namespace variables
} // namespace modsecurity

#endif // SRC_VARIABLES_ARGS_NAMES_RAW_H_
Comment thread
Easton97-Jens marked this conversation as resolved.
Outdated
4 changes: 2 additions & 2 deletions src/operators/pm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ void Pm::cleanup(acmp_node_t *n) {

postOrderTraversal(n->btree);

if (n->text && strlen(n->text) > 0) {
if (n->text && n->text[0] != '\0') {
free(n->text);
n->text = NULL;
}

if (n->pattern && strlen(n->pattern) > 0) {
if (n->pattern && n->pattern[0] != '\0') {
free(n->pattern);
n->pattern = NULL;
}
Expand Down
11 changes: 0 additions & 11 deletions src/parser/position.hh

This file was deleted.

Loading
Loading