mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-18 18:30:35 +03:00
Adds support to m_highlightJSON in RuleMessage class
This variable helds a JSON with information regarding all matches. Only filled when IncludeFullHighlightLog property is set.
This commit is contained in:
@@ -207,6 +207,8 @@ void ModSecurity::serverLog(void *data, std::shared_ptr<RuleMessage> rm) {
|
||||
if (m_logProperties & RuleMessageLogProperty) {
|
||||
const void *a = static_cast<const void *>(rm.get());
|
||||
if (m_logProperties & IncludeFullHighlightLogProperty) {
|
||||
processContentOffset(rm->m_buf.c_str(), rm->m_buf.size(),
|
||||
rm->m_reference.c_str(), &rm->m_highlightJSON, NULL);
|
||||
m_logCb(data, a);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,10 @@ std::string RuleMessage::log(const RuleMessage *rm, int props, int code) {
|
||||
return modsecurity::utils::string::toHexIfNeeded(msg);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Depricated. Do not use. Should be removed before merge.
|
||||
*
|
||||
*/
|
||||
RuleMessageHighlight RuleMessage::computeHighlight(const RuleMessage *rm,
|
||||
const std::string buf) {
|
||||
RuleMessageHighlight ret;
|
||||
|
||||
Reference in New Issue
Block a user