mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-09-18 08:15:14 +00:00
Return 400 when find blank line after boundary (#456)
This commit is contained in:
@@ -2177,6 +2177,11 @@ upload_read_cb (evhtp_request_t *req, evbuf_t *buf, void *arg)
|
||||
if (len == 0) {
|
||||
/* Read an blank line, headers end. */
|
||||
free (line);
|
||||
// Each part MUST contain a Content-Disposition header field
|
||||
if (!fsm->input_name) {
|
||||
res = EVHTP_RES_BADREQ;
|
||||
goto out;
|
||||
}
|
||||
if (g_strcmp0 (fsm->input_name, "file") == 0) {
|
||||
if (open_temp_file (fsm) < 0) {
|
||||
seaf_warning ("[upload] Failed open temp file, errno:[%d]\n", errno);
|
||||
|
Reference in New Issue
Block a user