Merge pull request #387 from Z-Wave-Me/master

Disallow WebDAV MKCOL/PUT/DELETE requests to protected files
This commit is contained in:
Sergey Lyubka 2014-06-28 21:40:11 +01:00
commit ac229b6606

View File

@ -4266,6 +4266,8 @@ static void open_local_endpoint(struct connection *conn, int skip_user) {
close_local_endpoint(conn); close_local_endpoint(conn);
#endif #endif
#ifndef MONGOOSE_NO_DAV #ifndef MONGOOSE_NO_DAV
} else if (must_hide_file(conn, path)) {
send_http_error(conn, 404, NULL);
} else if (!strcmp(conn->mg_conn.request_method, "PROPFIND")) { } else if (!strcmp(conn->mg_conn.request_method, "PROPFIND")) {
handle_propfind(conn, path, &st, exists); handle_propfind(conn, path, &st, exists);
} else if (!strcmp(conn->mg_conn.request_method, "MKCOL")) { } else if (!strcmp(conn->mg_conn.request_method, "MKCOL")) {