mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2026-01-01 06:09:03 +03:00
Cosmetics: Using VariableValues instead of std::vector<...>
Making the code more readable.
This commit is contained in:
committed by
Felipe Zimmerle
parent
d5cae10d3a
commit
64bffdebc4
@@ -961,7 +961,7 @@ int Transaction::processRequestBody() {
|
||||
* computationally intensive.
|
||||
*/
|
||||
std::string fullRequest;
|
||||
std::vector<std::shared_ptr<const VariableValue>> l;
|
||||
VariableValues l;
|
||||
m_variableRequestHeaders.resolve(&l);
|
||||
for (const auto &h : l) {
|
||||
fullRequest = fullRequest + h->getKey() + ": " + h->getValue() + "\n";
|
||||
@@ -1490,7 +1490,7 @@ std::string Transaction::toOldAuditLogFormatIndex(const std::string &filename,
|
||||
ss << utils::string::dash_if_empty(this->m_clientIpAddress->c_str()) << " ";
|
||||
/** TODO: Check variable */
|
||||
variables::RemoteUser *r = new variables::RemoteUser("REMOTE_USER");
|
||||
std::vector<std::shared_ptr<const VariableValue>> l;
|
||||
VariableValues l;
|
||||
r->evaluate(this, &l);
|
||||
delete r;
|
||||
|
||||
@@ -1553,7 +1553,7 @@ std::string Transaction::toOldAuditLogFormat(int parts,
|
||||
audit_log << std::endl;
|
||||
|
||||
if (parts & audit_log::AuditLog::BAuditLogPart) {
|
||||
std::vector<std::shared_ptr<const VariableValue>> l;
|
||||
VariableValues l;
|
||||
audit_log << "--" << trailer << "-" << "B--" << std::endl;
|
||||
audit_log << utils::string::dash_if_empty(
|
||||
m_variableRequestMethod.evaluate());
|
||||
@@ -1592,7 +1592,7 @@ std::string Transaction::toOldAuditLogFormat(int parts,
|
||||
audit_log << std::endl;
|
||||
}
|
||||
if (parts & audit_log::AuditLog::FAuditLogPart) {
|
||||
std::vector<std::shared_ptr<const VariableValue>> l;
|
||||
VariableValues l;
|
||||
|
||||
audit_log << "--" << trailer << "-" << "F--" << std::endl;
|
||||
audit_log << "HTTP/" << m_httpVersion.c_str() << " ";
|
||||
@@ -1693,7 +1693,7 @@ std::string Transaction::toJSON(int parts) {
|
||||
|
||||
/* request headers */
|
||||
if (parts & audit_log::AuditLog::BAuditLogPart) {
|
||||
std::vector<std::shared_ptr<const VariableValue>> l;
|
||||
VariableValues l;
|
||||
yajl_gen_string(g, reinterpret_cast<const unsigned char*>("headers"),
|
||||
strlen("headers"));
|
||||
yajl_gen_map_open(g);
|
||||
@@ -1722,7 +1722,7 @@ std::string Transaction::toJSON(int parts) {
|
||||
|
||||
/* response headers */
|
||||
if (parts & audit_log::AuditLog::FAuditLogPart) {
|
||||
std::vector<std::shared_ptr<const VariableValue>> l;
|
||||
VariableValues l;
|
||||
yajl_gen_string(g, reinterpret_cast<const unsigned char*>("headers"),
|
||||
strlen("headers"));
|
||||
yajl_gen_map_open(g);
|
||||
|
||||
Reference in New Issue
Block a user