mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 13:26:01 +03:00
Implements the support to fill the REQBODY_PROCESSOR variable
This commit is contained in:
parent
734f63bd07
commit
7cb27eb9fc
@ -214,3 +214,4 @@ TESTS+=test/test-cases/secrules-language-tests/operators/ipMatch.json
|
||||
TESTS+=test/test-cases/secrules-language-tests/operators/strmatch.json
|
||||
TESTS+=test/test-cases/secrules-language-tests/operators/detectXSS.json
|
||||
TESTS+=test/test-cases/secrules-language-tests/operators/eq.json
|
||||
TESTS+=test/test-cases/regression/variable-REQBODY_PROCESSOR.json
|
||||
|
@ -478,14 +478,18 @@ int Transaction::addRequestHeader(const std::string& key,
|
||||
std::string l = tolower(value);
|
||||
if (l.compare(0, multipart.length(), multipart) == 0) {
|
||||
this->m_requestBodyType = MultiPartRequestBody;
|
||||
m_collections.store("REQBODY_PROCESSOR", "MULTIPART");
|
||||
}
|
||||
|
||||
if (l == "application/x-www-form-urlencoded") {
|
||||
this->m_requestBodyType = WWWFormUrlEncoded;
|
||||
m_collections.store("REQBODY_PROCESSOR", "URLENCODED");
|
||||
}
|
||||
|
||||
if (l == "text/xml") {
|
||||
// FIXME: this should be set by ctl:requestBodyProcessor.
|
||||
this->m_requestBodyType = XMLRequestBody;
|
||||
m_collections.store("REQBODY_PROCESSOR", "XML");
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user