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:
parent
edb49d6f35
commit
36b0196c3e
@ -73,9 +73,8 @@ static inline size_t request_data_length(MHD_Connection* connection)
|
||||
|
||||
static bool modifies_data(MHD_Connection* connection, string method)
|
||||
{
|
||||
return (method == MHD_HTTP_METHOD_POST || method == MHD_HTTP_METHOD_PUT
|
||||
|| method == MHD_HTTP_METHOD_DELETE || method == MHD_HTTP_METHOD_PATCH)
|
||||
&& request_data_length(connection);
|
||||
return method == MHD_HTTP_METHOD_POST || method == MHD_HTTP_METHOD_PUT
|
||||
|| method == MHD_HTTP_METHOD_DELETE || method == MHD_HTTP_METHOD_PATCH;
|
||||
}
|
||||
|
||||
static void send_auth_error(MHD_Connection* connection)
|
||||
|
Loading…
x
Reference in New Issue
Block a user