mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-17 18:05:28 +03:00
Simplified initialization of Transformation's action_kind
- Some of the Transformation classes would initialize their Action's action_kind using the default (using Transformation constructor without an action_kind parameter). - Others, however, would use that constructor and initialize action_kind manually in their constructor, but setting the default value (RunTimeBeforeMatchAttemptKind = 1), which was redundant. - Removed unused Transformation constructor to specify action_kind. - Converted Action::Kind into an 'enum class' to require using the enum constants (instead of integer values, which are difficult to track in the codebase and change)
This commit is contained in:
@@ -36,7 +36,7 @@ class SetUID : public Action {
|
||||
: Action(_action) { }
|
||||
|
||||
explicit SetUID(std::unique_ptr<RunTimeString> z)
|
||||
: Action("setuid", RunTimeOnlyIfMatchKind),
|
||||
: Action("setuid"),
|
||||
m_string(std::move(z)) { }
|
||||
|
||||
bool evaluate(RuleWithActions *rule, Transaction *transaction) override;
|
||||
|
||||
Reference in New Issue
Block a user