mirror of
https://github.com/bitwarden/server.git
synced 2025-01-22 21:51:22 +01:00
Refuse upload renew if a file is validated (#1284)
Download should return regardless of file validation state
This commit is contained in:
parent
de155c78ad
commit
1bd515e8f0
@ -609,7 +609,7 @@ namespace Bit.Api.Controllers
|
||||
var cipher = await _cipherRepository.GetByIdAsync(cipherId, userId);
|
||||
var attachments = cipher?.GetAttachments();
|
||||
|
||||
if (attachments == null || !attachments.ContainsKey(attachmentId))
|
||||
if (attachments == null || !attachments.ContainsKey(attachmentId) || attachments[attachmentId].Validated)
|
||||
{
|
||||
throw new NotFoundException();
|
||||
}
|
||||
|
@ -365,7 +365,7 @@ namespace Bit.Core.Services
|
||||
{
|
||||
var attachments = cipher?.GetAttachments() ?? new Dictionary<string, CipherAttachment.MetaData>();
|
||||
|
||||
if (!attachments.ContainsKey(attachmentId) || attachments[attachmentId].Validated)
|
||||
if (!attachments.ContainsKey(attachmentId))
|
||||
{
|
||||
throw new NotFoundException();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user