mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Adds support to ARGS_POST_NAMES variable
This commit is contained in:
@@ -93,6 +93,7 @@ Assay::Assay(ModSecurity *ms, Rules *rules)
|
||||
m_ARGScombinedSize(0),
|
||||
m_ARGScombinedSizeStr(NULL),
|
||||
m_namesArgs(NULL),
|
||||
m_namesArgsPost(NULL),
|
||||
m_ms(ms) {
|
||||
id = std::to_string(this->timeStamp) + \
|
||||
std::to_string(generate_assay_unique_id());
|
||||
@@ -102,6 +103,8 @@ Assay::Assay(ModSecurity *ms, Rules *rules)
|
||||
this->m_ARGScombinedSizeStr = resolve_variable_first("ARGS_COMBINED_SIZE");
|
||||
store_variable("ARGS_NAMES", std::string(""));
|
||||
this->m_namesArgs = resolve_variable_first("ARGS_NAMES");
|
||||
store_variable("ARGS_POST_NAMES", std::string(""));
|
||||
this->m_namesArgsPost = resolve_variable_first("ARGS_POST_NAMES");
|
||||
|
||||
this->debug(4, "Initialising transaction");
|
||||
}
|
||||
@@ -408,6 +411,11 @@ int Assay::processRequestBody() {
|
||||
} else {
|
||||
m_namesArgs->assign(*m_namesArgs + " " + key_value[0]);
|
||||
}
|
||||
if (m_namesArgsPost->empty()) {
|
||||
m_namesArgsPost->assign(key_value[0]);
|
||||
} else {
|
||||
m_namesArgsPost->assign(*m_namesArgsPost + " " + key_value[0]);
|
||||
}
|
||||
|
||||
this->m_ARGScombinedSize = this->m_ARGScombinedSize + \
|
||||
key_value[0].length() + key_value[1].length();
|
||||
|
Reference in New Issue
Block a user