1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-13 14:53:18 +00:00

Fix for missing biometric integrity check in iOS extensions under certain conditions (#1162)

* Fix for biometric check in extension on fresh install

* make sure bio integrity values are written to pref storage

* integrity state migration to pref storage

* remove automatic state saving upon null validation
This commit is contained in:
Matt Portune
2020-12-01 15:30:23 -05:00
committed by GitHub
parent e27370cf32
commit ffd8f9951f
8 changed files with 64 additions and 20 deletions

View File

@@ -59,6 +59,8 @@ namespace Bit.iOS.Core.Controllers
_pinLock = (_pinSet.Item1 && _vaultTimeoutService.PinProtectedKey != null) || _pinSet.Item2;
_biometricLock = _vaultTimeoutService.IsBiometricLockSetAsync().GetAwaiter().GetResult() &&
_cryptoService.HasKeyAsync().GetAwaiter().GetResult();
_biometricIntegrityValid = _biometricService.ValidateIntegrityAsync(BiometricIntegrityKey).GetAwaiter()
.GetResult();
BaseNavItem.Title = _pinLock ? AppResources.VerifyPIN : AppResources.VerifyMasterPassword;
BaseCancelButton.Title = AppResources.Cancel;
@@ -88,8 +90,6 @@ namespace Bit.iOS.Core.Controllers
if (_biometricLock)
{
_biometricIntegrityValid = _biometricService.ValidateIntegrityAsync(BiometricIntegrityKey).GetAwaiter()
.GetResult();
if (!_biometricIntegrityValid)
{
return;
@@ -293,7 +293,7 @@ namespace Bit.iOS.Core.Controllers
cell.TextLabel.Font = ThemeHelpers.GetDangerFont();
cell.TextLabel.Lines = 0;
cell.TextLabel.LineBreakMode = UILineBreakMode.WordWrap;
cell.TextLabel.Text = AppResources.BiometricInvalidated;
cell.TextLabel.Text = AppResources.BiometricInvalidatedExtension;
}
return cell;
}