Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Make srpSalt check compatible with older API versions

Leendert de Borst56c8b61e9e59
diff --git a/apps/browser-extension/src/entrypoints/popup/hooks/useVaultSync.ts b/apps/browser-extension/src/entrypoints/popup/hooks/useVaultSync.ts
index b6de46e47..1c15cd72d 100644
--- a/apps/browser-extension/src/entrypoints/popup/hooks/useVaultSync.ts
+++ b/apps/browser-extension/src/entrypoints/popup/hooks/useVaultSync.ts
@@ -84,7 +84,7 @@ export const useVaultSync = () : {
// Check if the SRP salt has changed compared to locally stored encryption key derivation params
const storedEncryptionParams = await sendMessage('GET_ENCRYPTION_KEY_DERIVATION_PARAMS', {}, 'background') as EncryptionKeyDerivationParams | null;
- if (storedEncryptionParams && statusResponse.srpSalt !== '' && statusResponse.srpSalt !== storedEncryptionParams.salt) {
+ if (storedEncryptionParams && statusResponse.srpSalt && statusResponse.srpSalt !== storedEncryptionParams.salt) {
/**
* Server SRP salt has changed compared to locally stored value, which means the user has changed
* their password since the last time they logged in. This means that the local encryption key is no
diff --git a/apps/mobile-app/hooks/useVaultSync.ts b/apps/mobile-app/hooks/useVaultSync.ts
index a94975e87..2190499fc 100644
--- a/apps/mobile-app/hooks/useVaultSync.ts
+++ b/apps/mobile-app/hooks/useVaultSync.ts
@@ -92,7 +92,7 @@ export const useVaultSync = () : {
// Check if the SRP salt has changed compared to locally stored encryption key derivation params
const keyDerivationParams = await authContext.getEncryptionKeyDerivationParams();
- if (keyDerivationParams && statusResponse.srpSalt !== '' && statusResponse.srpSalt !== keyDerivationParams.salt) {
+ if (keyDerivationParams && statusResponse.srpSalt && statusResponse.srpSalt !== keyDerivationParams.salt) {
/**
* Server SRP salt has changed compared to locally stored value, which means the user has changed
* their password since the last time they logged in. This means that the local encryption key is no