MXS-2825: Fix basic user privileges
All POST, PUT, DELETE and PATCH commands should be prevented regardless of whether they define a request body.
This commit is contained in:
@ -73,9 +73,8 @@ static inline size_t request_data_length(MHD_Connection* connection)
|
|||||||
|
|
||||||
static bool modifies_data(MHD_Connection* connection, string method)
|
static bool modifies_data(MHD_Connection* connection, string method)
|
||||||
{
|
{
|
||||||
return (method == MHD_HTTP_METHOD_POST || method == MHD_HTTP_METHOD_PUT
|
return method == MHD_HTTP_METHOD_POST || method == MHD_HTTP_METHOD_PUT
|
||||||
|| method == MHD_HTTP_METHOD_DELETE || method == MHD_HTTP_METHOD_PATCH)
|
|| method == MHD_HTTP_METHOD_DELETE || method == MHD_HTTP_METHOD_PATCH;
|
||||||
&& request_data_length(connection);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void send_auth_error(MHD_Connection* connection)
|
static void send_auth_error(MHD_Connection* connection)
|
||||||
|
Reference in New Issue
Block a user