mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-20 02:57:12 +03:00
Support to JSON stuff on serial logging
This commit is contained in:
committed by
Felipe Zimmerle
parent
2988c5bb07
commit
63bef3d142
@@ -23,7 +23,16 @@ namespace modsecurity {
|
||||
namespace audit_log {
|
||||
namespace writer {
|
||||
|
||||
void Writer::generateBoundary(std::string *boundary) {
|
||||
static const char alphanum[] =
|
||||
"0123456789"
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
"abcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
for (int i = 0; i < SERIAL_AUDIT_LOG_BOUNDARY_LENGTH; ++i) {
|
||||
boundary->append(1, alphanum[rand() % (sizeof(alphanum) - 1)]);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace writer
|
||||
} // namespace audit_log
|
||||
|
||||
Reference in New Issue
Block a user