1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-26 12:55:17 +01:00

disable send (#1096)

This commit is contained in:
Chad Scharf 2021-01-19 16:46:59 -05:00 committed by GitHub
parent 5778a903c6
commit dd207aa840
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,6 +84,7 @@ namespace Bit.Api.Controllers
[HttpPost("")]
public async Task<SendResponseModel> Post([FromBody] SendRequestModel model)
{
throw new NotFoundException();
model.ValidateCreation();
var userId = _userService.GetProperUserId(User).Value;
var send = model.ToSend(userId, _sendService);
@ -96,6 +97,7 @@ namespace Bit.Api.Controllers
[DisableFormValueModelBinding]
public async Task<SendResponseModel> PostFile()
{
throw new NotFoundException();
if (!Request?.ContentType.Contains("multipart/") ?? true)
{
throw new BadRequestException("Invalid content.");