mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 21:36:00 +03:00
Discards the `charset' from the C-T while checking for body processors
Issue #1330
This commit is contained in:
parent
7ab192e90f
commit
39761ce7b8
@ -541,13 +541,14 @@ int Transaction::addRequestHeader(const std::string& key,
|
|||||||
|
|
||||||
if (keyl == "content-type") {
|
if (keyl == "content-type") {
|
||||||
std::string multipart("multipart/form-data");
|
std::string multipart("multipart/form-data");
|
||||||
|
std::string urlencoded("application/x-www-form-urlencoded;");
|
||||||
std::string l = utils::string::tolower(value);
|
std::string l = utils::string::tolower(value);
|
||||||
if (l.compare(0, multipart.length(), multipart) == 0) {
|
if (l.compare(0, multipart.length(), multipart) == 0) {
|
||||||
this->m_requestBodyType = MultiPartRequestBody;
|
this->m_requestBodyType = MultiPartRequestBody;
|
||||||
m_variableReqbodyProcessor.set("MULTIPART", m_variableOffset);
|
m_variableReqbodyProcessor.set("MULTIPART", m_variableOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (l == "application/x-www-form-urlencoded") {
|
if (l.compare(0, urlencoded.length(), urlencoded) == 0) {
|
||||||
this->m_requestBodyType = WWWFormUrlEncoded;
|
this->m_requestBodyType = WWWFormUrlEncoded;
|
||||||
m_variableReqbodyProcessor.set("URLENCODED", m_variableOffset);
|
m_variableReqbodyProcessor.set("URLENCODED", m_variableOffset);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user