Duplicates the url variable in the disruptive action

The log message needs to be freed by the consumer. Doing the same with
the url to keep the API consistent.
This commit is contained in:
Felipe Zimmerle 2017-06-19 18:32:17 -03:00
parent c3a0d8d9bb
commit f5b47a8077
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277

View File

@ -1297,7 +1297,9 @@ int Transaction::processLogging() {
*/ */
bool Transaction::intervention(ModSecurityIntervention *it) { bool Transaction::intervention(ModSecurityIntervention *it) {
if (m_it.disruptive) { if (m_it.disruptive) {
it->url = m_it.url; if (m_it.url) {
it->url = strdup(m_it.url);
}
it->disruptive = m_it.disruptive; it->disruptive = m_it.disruptive;
it->status = m_it.status; it->status = m_it.status;