Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Simplify unlock to ignore legacy structure (#2159)
Leendert de Borst444f6230f41c
diff --git a/apps/server/AliasVault.Client/Auth/Pages/Unlock.razor b/apps/server/AliasVault.Client/Auth/Pages/Unlock.razorindex 3ef275ebb..d5415b778 100644--- a/apps/server/AliasVault.Client/Auth/Pages/Unlock.razor+++ b/apps/server/AliasVault.Client/Auth/Pages/Unlock.razor@@ -183,26 +183,6 @@ elsereturn;}- // A legacy account has no chain: the derived key is the encryption key and is validated against the local test string.- if (resolved.IsLegacy)- {- if (!await AuthService.HasEncryptionKeyTestStringAsync())- {- // Nothing local to validate against, so the user has to log in again.- await AuthService.RemoveTokensAsync();- GlobalNotificationService.ClearMessages();- GlobalNotificationService.AddErrorMessage(Localizer["SessionTimedOutError"]);- NavigationManager.NavigateTo("/user/login");- return;- }-- if (!await AuthService.ValidateEncryptionKeyAsync(Convert.FromBase64String(resolved.VaultEncryptionKey)))- {- _serverValidationErrors.AddError(Localizer["IncorrectPasswordError"]);- return;- }- }-// Store the session keys in memory.await AuthService.StoreSessionKeysAsync(resolved);@@ -307,15 +287,8 @@ elsereturn;}- if (await AuthService.ValidateEncryptionKeyAsync(Convert.FromBase64String(resolved.VaultEncryptionKey)))- {- await AuthService.StoreSessionKeysAsync(resolved);- NavigationManager.NavigateTo("/");- }- else- {- Logger.LogWarning("The decrypted encryption key does not match the persisted encryption key. Falling back to password unlock.");- }+ await AuthService.StoreSessionKeysAsync(resolved);+ NavigationManager.NavigateTo("/");}catch (NotSupportedException){