mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-16 01:22:18 +03:00
Refactoring: Makes transformations to work with new execute signature
This commit is contained in:
@@ -90,8 +90,14 @@ void perform_unit_test(ModSecurityTest<UnitTest> *test, UnitTest *t,
|
||||
}
|
||||
delete op;
|
||||
} else if (t->type == "tfn") {
|
||||
modsecurity::ModSecStackString in;
|
||||
modsecurity::ModSecStackString out;
|
||||
std::string ret;
|
||||
in.assign(t->input.c_str(), t->input.size());
|
||||
Transformation *tfn = Transformation::instantiate("t:" + t->name);
|
||||
std::string ret = tfn->execute(t->input, NULL);
|
||||
tfn->execute(NULL, in, out);
|
||||
ret.assign(out.c_str(), out.size());
|
||||
|
||||
t->obtained = 1;
|
||||
t->obtainedOutput = ret;
|
||||
if (ret != t->output) {
|
||||
|
||||
Reference in New Issue
Block a user