Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/request_body_processor/multipart.cc
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ int Multipart::parse_content_disposition(const char *c_d_value, int offset) {
const char* start_of_filename = p;
while ((*p != '\0') && (*p != ';')) {
if (*p == '%') {
if ((*(p+1) == '\0') || (!isxdigit(*(p+1))) || (!isxdigit(*(p+2)))) {
if ((*(p+1) == '\0') || (!isxdigit(*(p+1))) || (*(p+2) == '\0') || (!isxdigit(*(p+2)))) {
Comment thread
airween marked this conversation as resolved.
Outdated
return -18;
}
p += 3;
Expand Down Expand Up @@ -415,7 +415,9 @@ int Multipart::parse_content_disposition(const char *c_d_value, int offset) {
value.append((p++), 1);
}

p++; /* go over the quote at the end */
if (*p == quote) {
p++; /* go over the quote at the end */
Comment thread
fzipi marked this conversation as resolved.
}

Comment thread
airween marked this conversation as resolved.
} else {
/* not quoted */
Expand Down
Loading