mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 21:36:00 +03:00
Modified the false pos. UNMATCHED_BOUNDARY error flag
This commit is contained in:
parent
af4afd348c
commit
4d0ca94490
@ -1483,9 +1483,15 @@ bool Multipart::process(const std::string& data, std::string *error,
|
|||||||
m_boundary.size()) == 0)) {
|
m_boundary.size()) == 0)) {
|
||||||
char *boundary_end = m_buf + 2 + m_boundary.size();
|
char *boundary_end = m_buf + 2 + m_boundary.size();
|
||||||
/* if it match, AND there was a matched boundary at least,
|
/* if it match, AND there was a matched boundary at least,
|
||||||
clear the m_flag_unmatched_boundary flag */
|
set the m_flag_unmatched_boundary flag to 2
|
||||||
|
this indicates that there were an opened boundary, which
|
||||||
|
matches the reference, and here is the final boundary.
|
||||||
|
The flag will differ from 0, so the previous rules ("!@eq 0")
|
||||||
|
will catch all "errors", without any modification, but we can
|
||||||
|
use the new, permission mode with "@eq 1"
|
||||||
|
*/
|
||||||
if (m_boundary_count > 0) {
|
if (m_boundary_count > 0) {
|
||||||
m_flag_unmatched_boundary = 0;
|
m_flag_unmatched_boundary = 2;
|
||||||
}
|
}
|
||||||
int is_final = 0;
|
int is_final = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user