mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Adds support for trim, left and right trim
This commit is contained in:
@@ -101,9 +101,9 @@ Transformation* Transformation::instantiate(std::string a) {
|
||||
IF_MATCH(sha1) { return new Sha1(a); }
|
||||
IF_MATCH(sql_hex_decode) { return new SqlHexDecode(a); }
|
||||
IF_MATCH(transformation) { return new Transformation(a); }
|
||||
IF_MATCH(trimLeft) { return new TrimLeft(a); }
|
||||
IF_MATCH(trimRight) { return new TrimRight(a); }
|
||||
IF_MATCH(trim) { return new Trim(a); }
|
||||
IF_MATCH(trim_left) { return new TrimLeft(a); }
|
||||
IF_MATCH(trim_right) { return new TrimRight(a); }
|
||||
IF_MATCH(url_decode) { return new UrlDecode(a); }
|
||||
IF_MATCH(urlDecodeUni) { return new UrlDecodeUni(a); }
|
||||
IF_MATCH(url_encode) { return new UrlEncode(a); }
|
||||
|
@@ -40,7 +40,7 @@ TrimLeft::TrimLeft(std::string action)
|
||||
|
||||
std::string TrimLeft::evaluate(std::string value,
|
||||
Assay *assay) {
|
||||
return *trim(&value);
|
||||
return *ltrim(&value);
|
||||
}
|
||||
|
||||
} // namespace transformations
|
||||
|
@@ -38,7 +38,7 @@ TrimRight::TrimRight(std::string action)
|
||||
|
||||
std::string TrimRight::evaluate(std::string value,
|
||||
Assay *assay) {
|
||||
return *this->trim(&value);
|
||||
return *this->rtrim(&value);
|
||||
}
|
||||
|
||||
} // namespace transformations
|
||||
|
Reference in New Issue
Block a user