1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

adjust date validation for send (#1137)

This commit is contained in:
Kyle Spearrin
2021-02-11 14:39:21 -05:00
committed by GitHub
parent 7c9ea83ad2
commit c3a99402f8
2 changed files with 24 additions and 5 deletions

View File

@ -122,6 +122,7 @@ namespace Bit.Api.Controllers
[HttpPut("{id}")]
public async Task<SendResponseModel> Put(string id, [FromBody] SendRequestModel model)
{
model.ValidateEdit();
var userId = _userService.GetProperUserId(User).Value;
var send = await _sendRepository.GetByIdAsync(new Guid(id));
if (send == null || send.UserId != userId)