Skip to content

Commit 78b7fa4

Browse files
author
Felipe Zimmerle
committed
Adds missing drop.h
1 parent d00ea51 commit 78b7fa4

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

Diff for: src/actions/disruptive/drop.h

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* ModSecurity, http://www.modsecurity.org/
3+
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
4+
*
5+
* You may not use this file except in compliance with
6+
* the License. You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* If any of the files related to licensing are missing or if you have any
11+
* other questions related to licensing please contact Trustwave Holdings, Inc.
12+
* directly using the email address [email protected].
13+
*
14+
*/
15+
16+
#include <string>
17+
#include <memory>
18+
19+
#include "modsecurity/actions/action.h"
20+
#include "modsecurity/transaction.h"
21+
#include "modsecurity/rules.h"
22+
#include "modsecurity/rule_message.h"
23+
24+
#ifndef SRC_ACTIONS_DISRUPTIVE_DROP_H_
25+
#define SRC_ACTIONS_DISRUPTIVE_DROP_H_
26+
27+
namespace modsecurity {
28+
namespace actions {
29+
namespace disruptive {
30+
31+
32+
class Drop : public Action {
33+
public:
34+
explicit Drop(std::string action) : Action(action) { }
35+
36+
bool evaluate(Rule *rule, Transaction *transaction,
37+
std::shared_ptr<RuleMessage> rm) override;
38+
bool isDisruptive() override { return true; }
39+
};
40+
41+
42+
} // namespace disruptive
43+
} // namespace actions
44+
} // namespace modsecurity
45+
46+
#endif // SRC_ACTIONS_DISRUPTIVE_DROP_H_

0 commit comments

Comments
 (0)