mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2026-01-10 02:04:36 +03:00
Tidy code. Update MULTIPART_STRICT_ERROR with multipart changes from the trunk.
This commit is contained in:
@@ -586,17 +586,22 @@ static int hook_request_late(request_rec *r) {
|
||||
/* If we are redirecting and there was no previous response it is
|
||||
* an error page request and we ignore it.
|
||||
*/
|
||||
if ((msr->r->prev != NULL) && (msr->r->prev->headers_out == NULL || apr_is_empty_table(msr->r->prev->headers_out))) {
|
||||
if ( (msr->r->prev != NULL)
|
||||
&& ((msr->r->prev->headers_out == NULL) || (apr_is_empty_table(msr->r->prev->headers_out))) )
|
||||
{
|
||||
msr_log(msr, 9, "Allowing internally redirected error document: %s", msr->r->uri);
|
||||
return DECLINED;
|
||||
}
|
||||
|
||||
if (msr->was_intercepted) {
|
||||
msr_log(msr, 4, "Phase REQUEST_BODY request already intercepted. Intercepting additional request.");
|
||||
return perform_interception(msr);
|
||||
}
|
||||
|
||||
if (msr->txcfg->debuglog_level >= 4) {
|
||||
msr_log(msr, 4, "Phase REQUEST_BODY already complete, skipping.");
|
||||
}
|
||||
|
||||
return DECLINED;
|
||||
}
|
||||
msr->phase_request_body_complete = 1;
|
||||
|
||||
@@ -1773,6 +1773,7 @@ static int var_multipart_strict_error_generate(modsec_rec *msr, msre_var *var, m
|
||||
||(msr->mpd->flag_data_after != 0)
|
||||
||(msr->mpd->flag_header_folding != 0)
|
||||
||(msr->mpd->flag_lf_line != 0)
|
||||
||(msr->mpd->flag_missing_semicolon != 0)
|
||||
) {
|
||||
return var_simple_generate(var, vartab, mptmp, "1");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user