Adds support to config warnings

This commit is contained in:
Felipe Zimmerle
2020-12-22 18:20:46 -03:00
parent bf87f11036
commit 62d35fbf97
17 changed files with 1197 additions and 939 deletions

View File

@@ -120,6 +120,19 @@ class Action {
}
};
class ActionNotSupported : public Action {
public:
ActionNotSupported() : Action()
{ };
explicit ActionNotSupported(const std::string& action)
: Action(action)
{ };
ActionNotSupported(const ActionNotSupported &other) = delete;
ActionNotSupported &operator=(const ActionNotSupported& a) = delete;
};
} // namespace actions
} // namespace modsecurity

View File

@@ -75,6 +75,7 @@ class RulesSet : public RulesSetProperties {
int evaluate(int phase, Transaction *transaction);
std::string getParserError();
std::string getParserWarnings();
void debug(int level, const std::string &id, const std::string &uri,
const std::string &msg);
@@ -95,11 +96,14 @@ extern "C" {
RulesSet *msc_create_rules_set(void);
void msc_rules_dump(RulesSet *rules);
int msc_rules_merge(RulesSet *rules_dst, RulesSet *rules_from, const char **error);
int msc_rules_merge(RulesSet *rules_dst, RulesSet *rules_from,
const char **warn, const char **error);
int msc_rules_add_remote(RulesSet *rules, const char *key, const char *uri,
const char **error);
int msc_rules_add_file(RulesSet *rules, const char *file, const char **error);
int msc_rules_add(RulesSet *rules, const char *plain_rules, const char **error);
const char **warn, const char **error);
int msc_rules_add_file(RulesSet *rules, const char *file,
const char **warn, const char **error);
int msc_rules_add(RulesSet *rules, const char *plain_rules,
const char **warn, const char **error);
int msc_rules_cleanup(RulesSet *rules);
#ifdef __cplusplus

View File

@@ -457,6 +457,7 @@ class RulesSetProperties {
RulesExceptions m_exceptions;
std::list<std::string> m_components;
std::ostringstream m_parserError;
std::ostringstream m_parserWarn;
ConfigSet m_responseBodyTypeToBeInspected;
ConfigString m_httpblKey;
ConfigString m_uploadDirectory;