Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
16 changes: 8 additions & 8 deletions headers/modsecurity/actions/action.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@ namespace actions {
class Action {
public:
explicit Action(const std::string& _action)
: action_kind(2),
m_isNone(false),
: m_isNone(false),
temporaryAction(false),
action_kind(2),
m_name(""),
m_referenceCount(1),
m_parser_payload(""),
temporaryAction(false) {
m_referenceCount(1) {
set_name_and_payload(_action);
}
explicit Action(const std::string& _action, int kind)
: action_kind(kind),
m_isNone(false),
: m_isNone(false),
temporaryAction(false),
action_kind(kind),
m_name(""),
m_referenceCount(1),
m_parser_payload(""),
temporaryAction(false) {
m_referenceCount(1) {
set_name_and_payload(_action);
}

Expand Down
10 changes: 5 additions & 5 deletions headers/modsecurity/rules.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ class Rules : public RulesProperties {
public:
Rules()
: RulesProperties(new DebugLog()),
unicode_codepage(0),
m_referenceCount(0),
m_secmarker_skipped(0),
unicode_codepage(0) {
m_secmarker_skipped(0) {
unicode_map_table = reinterpret_cast<int *>(
malloc(sizeof(int)*65536));
memset(unicode_map_table, -1, (sizeof(int)*65536));
}

explicit Rules(DebugLog *customLog)
: m_referenceCount(0),
m_secmarker_skipped(0),
: RulesProperties(customLog),
unicode_codepage(0),
RulesProperties(customLog) {
m_referenceCount(0),
m_secmarker_skipped(0) {
unicode_map_table = reinterpret_cast<int *>(
malloc(sizeof(int)*65536));
memset(unicode_map_table, -1, (sizeof(int)*65536));
Expand Down
30 changes: 15 additions & 15 deletions headers/modsecurity/rules_properties.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,31 +82,31 @@ class ConfigSet {
class RulesProperties {
public:
RulesProperties() :
m_debugLog(new DebugLog()),
m_auditLog(new AuditLog()),
m_remoteRulesActionOnFailed(PropertyNotSetRemoteRulesAction),
m_requestBodyLimitAction(PropertyNotSetBodyLimitAction),
m_responseBodyLimitAction(PropertyNotSetBodyLimitAction),
m_secRequestBodyAccess(PropertyNotSetConfigBoolean),
m_secResponseBodyAccess(PropertyNotSetConfigBoolean),
m_secXMLExternalEntity(PropertyNotSetConfigBoolean),
m_requestBodyLimitAction(PropertyNotSetBodyLimitAction),
m_responseBodyLimitAction(PropertyNotSetBodyLimitAction),
m_secRuleEngine(PropertyNotSetRuleEngine),
m_tmpSaveUploadedFiles(PropertyNotSetConfigBoolean),
m_uploadKeepFiles(PropertyNotSetConfigBoolean),
m_tmpSaveUploadedFiles(PropertyNotSetConfigBoolean) { }
m_debugLog(new DebugLog()),
m_remoteRulesActionOnFailed(PropertyNotSetRemoteRulesAction),
m_secRuleEngine(PropertyNotSetRuleEngine) { }


explicit RulesProperties(DebugLog *debugLog) :
m_debugLog(debugLog),
m_auditLog(new AuditLog()),
m_remoteRulesActionOnFailed(PropertyNotSetRemoteRulesAction),
m_requestBodyLimitAction(PropertyNotSetBodyLimitAction),
m_responseBodyLimitAction(PropertyNotSetBodyLimitAction),
m_secRequestBodyAccess(PropertyNotSetConfigBoolean),
m_secResponseBodyAccess(PropertyNotSetConfigBoolean),
m_secXMLExternalEntity(PropertyNotSetConfigBoolean),
m_requestBodyLimitAction(PropertyNotSetBodyLimitAction),
m_responseBodyLimitAction(PropertyNotSetBodyLimitAction),
m_secRuleEngine(PropertyNotSetRuleEngine),
m_tmpSaveUploadedFiles(PropertyNotSetConfigBoolean),
m_uploadKeepFiles(PropertyNotSetConfigBoolean),
m_tmpSaveUploadedFiles(PropertyNotSetConfigBoolean) { }
m_debugLog(debugLog),
m_remoteRulesActionOnFailed(PropertyNotSetRemoteRulesAction),
m_secRuleEngine(PropertyNotSetRuleEngine) { }


~RulesProperties() {
Expand Down Expand Up @@ -360,7 +360,7 @@ class RulesProperties {
std::vector<actions::Action *> *actions_from = \
from->m_defaultActions+i;
std::vector<actions::Action *> *actions_to = to->m_defaultActions+i;
for (int j = 0; j < actions_from->size(); j++) {
for (size_t j = 0; j < actions_from->size(); j++) {
actions::Action *action = actions_from->at(j);
action->refCountIncrease();
actions_to->push_back(action);
Expand Down Expand Up @@ -411,9 +411,9 @@ class RulesProperties {
for (int i = 0; i < modsecurity::Phases::NUMBER_OF_PHASES; i++) {
std::vector<modsecurity::Rule *> *rules_to = to+i;
std::vector<modsecurity::Rule *> *rules_from = from+i;
for (int j = 0; j < rules_from->size(); j++) {
for (size_t j = 0; j < rules_from->size(); j++) {
Rule *rule = rules_from->at(j);
for (int z = 0; z < rules_to->size(); z++) {
for (size_t z = 0; z < rules_to->size(); z++) {
Rule *rule_ckc = rules_to->at(z);
if (rule_ckc->m_ruleId == rule->m_ruleId &&
rule_ckc->m_secMarker == false &&
Expand Down
2 changes: 1 addition & 1 deletion headers/modsecurity/transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ class TransactionAnchoredVariables {
m_variableRemotePort(t, "REMOTE_PORT"),
m_variableReqbodyError(t, "REQBODY_ERROR"),
m_variableReqbodyErrorMsg(t, "REQBODY_ERROR_MSG"),
m_variableReqbodyProcessorErrorMsg(t, "REQBODY_PROCESSOR_ERROR_MSG"),
m_variableReqbodyProcessorError(t, "REQBODY_PROCESSOR_ERROR"),
m_variableReqbodyProcessorErrorMsg(t, "REQBODY_PROCESSOR_ERROR_MSG"),
m_variableReqbodyProcessor(t, "REQBODY_PROCESSOR"),
m_variableRequestBasename(t, "REQUEST_BASENAME"),
m_variableRequestBody(t, "REQUEST_BODY"),
Expand Down