Skip to content

Commit

Permalink
return default kdf info
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin committed Sep 7, 2019
1 parent 294a6db commit 5d047d5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/Api/Controllers/AccountsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Bit.Api.Utilities;
using Bit.Core.Models.Table;
using System.Collections.Generic;
using Bit.Core.Models.Data;

namespace Bit.Api.Controllers
{
Expand All @@ -25,9 +26,7 @@ public class AccountsController : Controller
private readonly IUserRepository _userRepository;
private readonly ICipherRepository _cipherRepository;
private readonly IFolderRepository _folderRepository;
private readonly ICipherService _cipherService;
private readonly IOrganizationUserRepository _organizationUserRepository;
private readonly ILicensingService _licenseService;
private readonly IPaymentService _paymentService;
private readonly GlobalSettings _globalSettings;

Expand All @@ -36,19 +35,15 @@ public class AccountsController : Controller
IUserRepository userRepository,
ICipherRepository cipherRepository,
IFolderRepository folderRepository,
ICipherService cipherService,
IOrganizationUserRepository organizationUserRepository,
ILicensingService licenseService,
IPaymentService paymentService,
GlobalSettings globalSettings)
{
_userService = userService;
_userRepository = userRepository;
_cipherRepository = cipherRepository;
_folderRepository = folderRepository;
_cipherService = cipherService;
_organizationUserRepository = organizationUserRepository;
_licenseService = licenseService;
_paymentService = paymentService;
_globalSettings = globalSettings;
}
Expand All @@ -60,7 +55,11 @@ public async Task<PreloginResponseModel> PostPrelogin([FromBody]PreloginRequestM
var kdfInformation = await _userRepository.GetKdfInformationByEmailAsync(model.Email);
if(kdfInformation == null)
{
throw new NotFoundException();
kdfInformation = new UserKdfInformation
{
Kdf = KdfType.PBKDF2_SHA256,
KdfIterations = 100000
};
}
return new PreloginResponseModel(kdfInformation);
}
Expand Down

0 comments on commit 5d047d5

Please sign in to comment.