Skip to content

Commit 105c590

Browse files
committed
Add more fields to encode filter: rev, ver and tag
1 parent c7306d1 commit 105c590

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/rule_message.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ std::string RuleMessage::_details(const RuleMessage *rm) {
2929
msg.append(" [file \"" + std::string(*rm->m_ruleFile.get()) + "\"]");
3030
msg.append(" [line \"" + std::to_string(rm->m_ruleLine) + "\"]");
3131
msg.append(" [id \"" + std::to_string(rm->m_ruleId) + "\"]");
32-
msg.append(" [rev \"" + rm->m_rev + "\"]");
32+
msg.append(" [rev \"" + utils::string::toHexIfNeeded(rm->m_rev, true) + "\"]");
3333
msg.append(" [msg \"" + rm->m_message + "\"]");
34-
msg.append(" [data \"" + utils::string::log_escape_hex(utils::string::limitTo(200, rm->m_data)) + "\"]");
34+
msg.append(" [data \"" + utils::string::toHexIfNeeded(utils::string::limitTo(200, rm->m_data), true) + "\"]");
3535
msg.append(" [severity \"" +
3636
std::to_string(rm->m_severity) + "\"]");
37-
msg.append(" [ver \"" + rm->m_ver + "\"]");
37+
msg.append(" [ver \"" + utils::string::toHexIfNeeded(rm->m_ver, true) + "\"]");
3838
msg.append(" [maturity \"" + std::to_string(rm->m_maturity) + "\"]");
3939
msg.append(" [accuracy \"" + std::to_string(rm->m_accuracy) + "\"]");
4040

4141
for (auto &a : rm->m_tags) {
42-
msg.append(" [tag \"" + a + "\"]");
42+
msg.append(" [tag \"" + utils::string::toHexIfNeeded(a, true) + "\"]");
4343
}
4444

4545
msg.append(" [hostname \"" + *rm->m_serverIpAddress.get() \

0 commit comments

Comments
 (0)