From ef0fea8101b4ad670c2d9ce10ab5d7606c25afc1 Mon Sep 17 00:00:00 2001 From: Maksim Chegulov Date: Tue, 28 Nov 2023 14:40:16 +0300 Subject: [PATCH] bug 64979 --- .../Core/Core/VirtualRooms/InvitationLinkService.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/products/ASC.Files/Core/Core/VirtualRooms/InvitationLinkService.cs b/products/ASC.Files/Core/Core/VirtualRooms/InvitationLinkService.cs index 629375dbebb..018cf80fa04 100644 --- a/products/ASC.Files/Core/Core/VirtualRooms/InvitationLinkService.cs +++ b/products/ASC.Files/Core/Core/VirtualRooms/InvitationLinkService.cs @@ -39,6 +39,7 @@ public class InvitationLinkService private readonly CountPaidUserChecker _countPaidUserChecker; private readonly FileSecurity _fileSecurity; private readonly UserManager _userManager; + private readonly IPSecurity.IPSecurity _iPSecurity; public InvitationLinkService( CommonLinkUtility commonLinkUtility, @@ -48,7 +49,8 @@ public InvitationLinkService( TenantManager tenantManager, CountPaidUserChecker countPaidUserChecker, FileSecurity fileSecurity, - UserManager userManager) + UserManager userManager, + IPSecurity.IPSecurity iPSecurity) { _commonLinkUtility = commonLinkUtility; _daoFactory = daoFactory; @@ -58,6 +60,7 @@ public InvitationLinkService( _countPaidUserChecker = countPaidUserChecker; _fileSecurity = fileSecurity; _userManager = userManager; + _iPSecurity = iPSecurity; } public string GetInvitationLink(Guid linkId, Guid createdBy) @@ -97,6 +100,11 @@ public async Task GetInvitationLinkAsync(string email, EmployeeType empl public async Task ValidateAsync(string key, string email, EmployeeType employeeType, string roomId = default) { + if (!await _iPSecurity.VerifyAsync()) + { + throw new SecurityException(); + } + var linkData = await GetProcessedLinkDataAsync(key, email, employeeType); var result = new Validation { Result = linkData.Result };