From c1ceeace956444ffb18d31e1b7bd661a4560cb0f Mon Sep 17 00:00:00 2001 From: Thomas Rittson <31796059+eliykat@users.noreply.github.com> Date: Thu, 8 Apr 2021 06:42:12 +1000 Subject: [PATCH] Require user to verify email to use file Send (#1262) --- src/Core/Services/Implementations/SendService.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Core/Services/Implementations/SendService.cs b/src/Core/Services/Implementations/SendService.cs index d0bdb1ea97..11ce8b278c 100644 --- a/src/Core/Services/Implementations/SendService.cs +++ b/src/Core/Services/Implementations/SendService.cs @@ -316,7 +316,12 @@ namespace Bit.Core.Services var user = await _userRepository.GetByIdAsync(send.UserId.Value); if (!await _userService.CanAccessPremium(user)) { - throw new BadRequestException("You must have premium status to use file sends."); + throw new BadRequestException("You must have premium status to use file Sends."); + } + + if (!user.EmailVerified) + { + throw new BadRequestException("You must confirm your email to use file Sends."); } if (user.Premium)