Modified the false pos. UNMATCHED_BOUNDARY error flag

This commit is contained in:
Ervin Hegedus 2018-06-04 12:13:32 +00:00 committed by Felipe Zimmerle
parent af4afd348c
commit 4d0ca94490
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277

View File

@ -1483,9 +1483,15 @@ bool Multipart::process(const std::string& data, std::string *error,
m_boundary.size()) == 0)) {
char *boundary_end = m_buf + 2 + m_boundary.size();
/* 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) {
m_flag_unmatched_boundary = 0;
m_flag_unmatched_boundary = 2;
}
int is_final = 0;