mirror of
https://github.com/cesanta/mongoose.git
synced 2025-06-11 03:46:25 +08:00
Disallow WebDAV MKCOL/PUT/DELETE requests to protected files (like .htpasswd)
This commit is contained in:
parent
0d9fe39dbb
commit
b0cf8304cb
@ -4268,6 +4268,8 @@ static void open_local_endpoint(struct connection *conn, int skip_user) {
|
||||
#ifndef MONGOOSE_NO_DAV
|
||||
} else if (!strcmp(conn->mg_conn.request_method, "PROPFIND")) {
|
||||
handle_propfind(conn, path, &st, exists);
|
||||
} else if (must_hide_file(conn, path)) {
|
||||
send_http_error(conn, 404, NULL);
|
||||
} else if (!strcmp(conn->mg_conn.request_method, "MKCOL")) {
|
||||
handle_mkcol(conn, path);
|
||||
} else if (!strcmp(conn->mg_conn.request_method, "DELETE")) {
|
||||
|
Loading…
Reference in New Issue
Block a user