mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-15 23:55:03 +03:00
Marks redirect action as disruptive
This commit is contained in:
parent
c1e3eac09d
commit
827b15f5c9
@ -30,7 +30,13 @@ Redirect::~Redirect() {
|
|||||||
Redirect::Redirect(const std::string& action)
|
Redirect::Redirect(const std::string& action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind),
|
: Action(action, RunTimeOnlyIfMatchKind),
|
||||||
m_url(action) {
|
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;
|
m_status = 302;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,9 +52,9 @@ void Redirect::fill_intervention(ModSecurityIntervention *i) {
|
|||||||
if (i->status == 200) {
|
if (i->status == 200) {
|
||||||
i->status = m_status;
|
i->status = m_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
i->url = m_urlExpanded.c_str();
|
i->url = m_urlExpanded.c_str();
|
||||||
i->log = "Redirecting";
|
i->log = "Redirecting";
|
||||||
|
i->disruptive = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace actions
|
} // namespace actions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user