mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-16 17:41:52 +03:00
Refactoring: Makes transformations to work with new execute signature
This commit is contained in:
@@ -307,7 +307,9 @@ int ModSecurity::processContentOffset(const char *content, size_t len,
|
||||
|
||||
while (!trans.empty()) {
|
||||
modsecurity::actions::transformations::Transformation *t;
|
||||
std::string varValueRes;
|
||||
ModSecStackString in;
|
||||
ModSecStackString out;
|
||||
|
||||
yajl_gen_map_open(g);
|
||||
yajl_gen_string(g,
|
||||
reinterpret_cast<const unsigned char*>("transformation"),
|
||||
@@ -319,8 +321,9 @@ int ModSecurity::processContentOffset(const char *content, size_t len,
|
||||
|
||||
t = modsecurity::actions::transformations::Transformation::instantiate(
|
||||
trans.back().str().c_str());
|
||||
varValueRes = t->execute(varValue, NULL);
|
||||
varValue.assign(varValueRes);
|
||||
in.assign(varValue.c_str());
|
||||
t->execute(NULL, in, out);
|
||||
varValue.assign(out.c_str());
|
||||
trans.pop_back();
|
||||
|
||||
yajl_gen_string(g, reinterpret_cast<const unsigned char*>("value"),
|
||||
|
||||
Reference in New Issue
Block a user