From 827b15f5c9ba70d2ffead9b0c2f859f0f67e7442 Mon Sep 17 00:00:00 2001 From: Felipe Zimmerle Date: Mon, 19 Oct 2015 23:04:33 -0300 Subject: [PATCH] Marks redirect action as disruptive --- src/actions/redirect.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/actions/redirect.cc b/src/actions/redirect.cc index 1f4af306..0232d92a 100644 --- a/src/actions/redirect.cc +++ b/src/actions/redirect.cc @@ -30,7 +30,13 @@ Redirect::~Redirect() { Redirect::Redirect(const std::string& action) : Action(action, RunTimeOnlyIfMatchKind), m_url(action) { - m_url = m_url.erase(0, 9); + //m_url = m_url.erase(0, 9); + if (m_url.at(0) == '\'') { + m_url.erase(0, 1); + if (m_url.size() > 0) { + m_url.pop_back(); + } + } m_status = 302; } @@ -46,9 +52,9 @@ void Redirect::fill_intervention(ModSecurityIntervention *i) { if (i->status == 200) { i->status = m_status; } - i->url = m_urlExpanded.c_str(); i->log = "Redirecting"; + i->disruptive = true; } } // namespace actions