mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-19 02:40:35 +03:00
Changes debuglogs schema to avoid unecessary str allocation
This commit is contained in:
@@ -133,30 +133,30 @@ bool SetVar::evaluate(Rule *rule, Transaction *t) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef NO_LOGS
|
||||
t->debug(8, "Saving variable: " + m_variable->m_collectionName \
|
||||
ms_dbg_a(t, 8, "Saving variable: " + m_variable->m_collectionName \
|
||||
+ ":" + m_variableNameExpanded + " with value: " + targetValue);
|
||||
#endif
|
||||
if (tx) {
|
||||
tx->storeOrUpdateFirst(t, m_variableNameExpanded, targetValue);
|
||||
} else if (session) {
|
||||
session->storeOrUpdateFirst(t, m_variableNameExpanded, targetValue);
|
||||
} else if (ip) {
|
||||
ip->storeOrUpdateFirst(t, m_variableNameExpanded, targetValue);
|
||||
} else if (resource) {
|
||||
resource->storeOrUpdateFirst(t, m_variableNameExpanded, targetValue);
|
||||
} else if (global) {
|
||||
global->storeOrUpdateFirst(t, m_variableNameExpanded, targetValue);
|
||||
} else if (user) {
|
||||
user->storeOrUpdateFirst(t, m_variableNameExpanded, targetValue);
|
||||
} else {
|
||||
// ?
|
||||
}
|
||||
/*
|
||||
t->m_collections.storeOrUpdateFirst(m_variable->m_collectionName,
|
||||
m_variableNameExpanded,
|
||||
t->m_rules->m_secWebAppId.m_value, targetValue);
|
||||
*/
|
||||
|
||||
if (tx) {
|
||||
tx->storeOrUpdateFirst(t, m_variableNameExpanded, targetValue);
|
||||
} else if (session) {
|
||||
session->storeOrUpdateFirst(t, m_variableNameExpanded, targetValue);
|
||||
} else if (ip) {
|
||||
ip->storeOrUpdateFirst(t, m_variableNameExpanded, targetValue);
|
||||
} else if (resource) {
|
||||
resource->storeOrUpdateFirst(t, m_variableNameExpanded, targetValue);
|
||||
} else if (global) {
|
||||
global->storeOrUpdateFirst(t, m_variableNameExpanded, targetValue);
|
||||
} else if (user) {
|
||||
user->storeOrUpdateFirst(t, m_variableNameExpanded, targetValue);
|
||||
} else {
|
||||
// ?
|
||||
}
|
||||
|
||||
/*
|
||||
t->m_collections.storeOrUpdateFirst(m_variable->m_collectionName,
|
||||
m_variableNameExpanded,
|
||||
t->m_rules->m_secWebAppId.m_value, targetValue);
|
||||
*/
|
||||
end:
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user