Skip to content

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

Add srp salt sanity check to browser extension (#1118)

Leendert de Borst784e64ece8f5
diff --git a/apps/browser-extension/src/entrypoints/background.ts b/apps/browser-extension/src/entrypoints/background.ts
index 10dd96498..9ad7cf773 100644
--- a/apps/browser-extension/src/entrypoints/background.ts
+++ b/apps/browser-extension/src/entrypoints/background.ts
@@ -2,9 +2,10 @@ import { onMessage, sendMessage } from "webext-bridge/background";
import { setupContextMenus } from '@/entrypoints/background/ContextMenu';
import { handleOpenPopup, handlePopupWithCredential, handleToggleContextMenu } from '@/entrypoints/background/PopupMessageHandler';
-import { handleCheckAuthStatus, handleClearPersistedFormValues, handleClearVault, handleCreateIdentity, handleGetCredentials, handleGetDefaultEmailDomain, handleGetDefaultIdentitySettings, handleGetDerivedKey, handleGetPasswordSettings, handleGetPersistedFormValues, handleGetVault, handlePersistFormValues, handleStoreVault, handleSyncVault, handleUploadVault } from '@/entrypoints/background/VaultMessageHandler';
+import { handleCheckAuthStatus, handleClearPersistedFormValues, handleClearVault, handleCreateIdentity, handleGetCredentials, handleGetDefaultEmailDomain, handleGetDefaultIdentitySettings, handleGetDerivedKey, handleGetEncryptionKeyDerivationParams, handleGetPasswordSettings, handleGetPersistedFormValues, handleGetVault, handlePersistFormValues, handleStoreEncryptionKey, handleStoreEncryptionKeyDerivationParams, handleStoreVault, handleSyncVault, handleUploadVault } from '@/entrypoints/background/VaultMessageHandler';
import { GLOBAL_CONTEXT_MENU_ENABLED_KEY } from '@/utils/Constants';
+import type { EncryptionKeyDerivationParams } from '@/utils/dist/shared/models/metadata';
import { defineBackground, storage, browser } from '#imports';
@@ -15,17 +16,26 @@ export default defineBackground({
async main() {
// Listen for messages using webext-bridge
onMessage('CHECK_AUTH_STATUS', () => handleCheckAuthStatus());
- onMessage('STORE_VAULT', ({ data }) => handleStoreVault(data));
- onMessage('UPLOAD_VAULT', ({ data }) => handleUploadVault(data));
- onMessage('SYNC_VAULT', () => handleSyncVault());
+
+ onMessage('GET_DERIVED_KEY', () => handleGetDerivedKey());
+ onMessage('GET_ENCRYPTION_KEY_DERIVATION_PARAMS', () => handleGetEncryptionKeyDerivationParams());
onMessage('GET_VAULT', () => handleGetVault());
- onMessage('CLEAR_VAULT', () => handleClearVault());
onMessage('GET_CREDENTIALS', () => handleGetCredentials());
- onMessage('CREATE_IDENTITY', ({ data }) => handleCreateIdentity(data));
+
onMessage('GET_DEFAULT_EMAIL_DOMAIN', () => handleGetDefaultEmailDomain());
onMessage('GET_DEFAULT_IDENTITY_SETTINGS', () => handleGetDefaultIdentitySettings());
onMessage('GET_PASSWORD_SETTINGS', () => handleGetPasswordSettings());
- onMessage('GET_DERIVED_KEY', () => handleGetDerivedKey());
+
+ onMessage('STORE_VAULT', ({ data }) => handleStoreVault(data));
+ onMessage('STORE_ENCRYPTION_KEY', ({ data }) => handleStoreEncryptionKey(data as string));
+ onMessage('STORE_ENCRYPTION_KEY_DERIVATION_PARAMS', ({ data }) => handleStoreEncryptionKeyDerivationParams(data as EncryptionKeyDerivationParams));
+
+ onMessage('CREATE_IDENTITY', ({ data }) => handleCreateIdentity(data));
+ onMessage('UPLOAD_VAULT', ({ data }) => handleUploadVault(data));
+ onMessage('SYNC_VAULT', () => handleSyncVault());
+
+ onMessage('CLEAR_VAULT', () => handleClearVault());
+
onMessage('OPEN_POPUP', () => handleOpenPopup());
onMessage('OPEN_POPUP_WITH_CREDENTIAL', ({ data }) => handlePopupWithCredential(data));
onMessage('TOGGLE_CONTEXT_MENU', ({ data }) => handleToggleContextMenu(data));
diff --git a/apps/browser-extension/src/entrypoints/background/VaultMessageHandler.ts b/apps/browser-extension/src/entrypoints/background/VaultMessageHandler.ts
index 1a3ab5ee5..89fa3cd56 100644
--- a/apps/browser-extension/src/entrypoints/background/VaultMessageHandler.ts
+++ b/apps/browser-extension/src/entrypoints/background/VaultMessageHandler.ts
@@ -1,6 +1,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { storage } from 'wxt/utils/storage';
+import type { EncryptionKeyDerivationParams } from '@/utils/dist/shared/models/metadata';
import type { Vault, VaultResponse, VaultPostResponse } from '@/utils/dist/shared/models/webapi';
import { EncryptionUtility } from '@/utils/EncryptionUtility';
import { SqliteClient } from '@/utils/SqliteClient';
@@ -82,11 +83,6 @@ export async function handleStoreVault(
* Some updates, e.g. when mutating local database, these values will not be set.
*/
- // Store derived key in session storage (if it has a value)
- if (vaultRequest.derivedKey) {
- await storage.setItem('session:derivedKey', vaultRequest.derivedKey);
- }
-
if (vaultRequest.publicEmailDomainList) {
await storage.setItem('session:publicEmailDomains', vaultRequest.publicEmailDomainList);
}
@@ -106,6 +102,36 @@ export async function handleStoreVault(
}
}
+/**
+ * Store the encryption key (derived key) in browser storage.
+ */
+export async function handleStoreEncryptionKey(
+ derivedKey: string,
+) : Promise<messageBoolResponse> {
+ try {
+ await storage.setItem('session:derivedKey', derivedKey);
+ return { success: true };
+ } catch (error) {
+ console.error('Failed to store encryption key:', error);
+ return { success: false, error: await t('common.errors.failedToStoreEncryptionKey') };
+ }
+}
+
+/**
+ * Store the encryption key derivation parameters in browser storage.
+ */
+export async function handleStoreEncryptionKeyDerivationParams(
+ params: EncryptionKeyDerivationParams,
+) : Promise<messageBoolResponse> {
+ try {
+ await storage.setItem('session:encryptionKeyDerivationParams', params);
+ return { success: true };
+ } catch (error) {
+ console.error('Failed to store encryption key derivation params:', error);
+ return { success: false, error: await t('common.errors.failedToStoreEncryptionParams') };
+ }
+}
+
/**
* Sync the vault with the server to check if a newer vault is available. If so, the vault will be updated.
*/
@@ -166,7 +192,7 @@ export async function handleGetVault(
};
} catch (error) {
console.error('Failed to get vault:', error);
- return { success: false, error: await t('common.errors.failedToGetVault') };
+ return { success: false, error: await t('common.errors.failedToRetrieveData') };
}
}
@@ -178,6 +204,7 @@ export function handleClearVault(
storage.removeItems([
'session:encryptedVault',
'session:derivedKey',
+ 'session:encryptionKeyDerivationParams',
'session:publicEmailDomains',
'session:privateEmailDomains',
'session:vaultRevisionNumber'
@@ -203,7 +230,7 @@ export async function handleGetCredentials(
return { success: true, credentials: credentials };
} catch (error) {
console.error('Error getting credentials:', error);
- return { success: false, error: await t('common.errors.failedToGetCredentials') };
+ return { success: false, error: await t('common.errors.failedToRetrieveData') };
}
}
@@ -223,7 +250,7 @@ export async function handleCreateIdentity(
const sqliteClient = await createVaultSqliteClient();
// Add the new credential to the vault/database.
- sqliteClient.createCredential(message.credential);
+ await sqliteClient.createCredential(message.credential, message.attachments || []);
// Upload the new vault to the server.
await uploadNewVaultToServer(sqliteClient);
@@ -231,7 +258,7 @@ export async function handleCreateIdentity(
return { success: true };
} catch (error) {
console.error('Failed to create identity:', error);
- return { success: false, error: await t('common.errors.failedToCreateIdentity') };
+ return { success: false, error: await t('common.errors.unknownError') };
}
}
@@ -273,7 +300,7 @@ export function handleGetDefaultEmailDomain(): Promise<stringResponse> {
return { success: true, value: defaultEmailDomain ?? undefined };
} catch (error) {
console.error('Error getting default email domain:', error);
- return { success: false, error: await t('common.errors.failedToGetDefaultEmailDomain') };
+ return { success: false, error: await t('common.errors.failedToRetrieveData') };
}
})();
}
@@ -297,7 +324,7 @@ export async function handleGetDefaultIdentitySettings(
};
} catch (error) {
console.error('Error getting default identity settings:', error);
- return { success: false, error: await t('common.errors.failedToGetDefaultIdentitySettings') };
+ return { success: false, error: await t('common.errors.failedToRetrieveData') };
}
}
@@ -313,7 +340,7 @@ export async function handleGetPasswordSettings(
return { success: true, settings: passwordSettings };
} catch (error) {
console.error('Error getting password settings:', error);
- return { success: false, error: await t('common.errors.failedToGetPasswordSettings') };
+ return { success: false, error: await t('common.errors.failedToRetrieveData') };
}
}
@@ -326,6 +353,15 @@ export async function handleGetDerivedKey(
return derivedKey;
}
+/**
+ * Get the encryption key derivation parameters for password change detection and offline mode.
+ */
+export async function handleGetEncryptionKeyDerivationParams(
+) : Promise<EncryptionKeyDerivationParams | null> {
+ const params = await storage.getItem('session:encryptionKeyDerivationParams') as EncryptionKeyDerivationParams | null;
+ return params;
+}
+
/**
* Upload the vault to the server.
*/
@@ -443,7 +479,7 @@ async function uploadNewVaultToServer(sqliteClient: SqliteClient) : Promise<Vaul
if (response.status === 0) {
await storage.setItem('session:vaultRevisionNumber', response.newRevisionNumber);
} else {
- throw new Error(await t('common.errors.failedToUploadVaultToServer'));
+ throw new Error(await t('common.errors.failedToUploadVault'));
}
return response;
diff --git a/apps/browser-extension/src/entrypoints/popup/context/DbContext.tsx b/apps/browser-extension/src/entrypoints/popup/context/DbContext.tsx
index b7beb6c51..2e1c34a46 100644
--- a/apps/browser-extension/src/entrypoints/popup/context/DbContext.tsx
+++ b/apps/browser-extension/src/entrypoints/popup/context/DbContext.tsx
@@ -1,7 +1,7 @@
import React, { createContext, useContext, useState, useEffect, useCallback, useMemo } from 'react';
import { sendMessage } from 'webext-bridge/popup';
-import type { VaultMetadata } from '@/utils/dist/shared/models/metadata';
+import type { EncryptionKeyDerivationParams, VaultMetadata } from '@/utils/dist/shared/models/metadata';
import type { VaultResponse } from '@/utils/dist/shared/models/webapi';
import EncryptionUtility from '@/utils/EncryptionUtility';
import SqliteClient from '@/utils/SqliteClient';
@@ -13,6 +13,8 @@ type DbContextType = {
dbInitialized: boolean;
dbAvailable: boolean;
initializeDatabase: (vaultResponse: VaultResponse, derivedKey: string) => Promise<SqliteClient>;
+ storeEncryptionKey: (derivedKey: string) => Promise<void>;
+ storeEncryptionKeyDerivationParams: (params: EncryptionKeyDerivationParams) => Promise<void>;
clearDatabase: () => void;
getVaultMetadata: () => Promise<VaultMetadata | null>;
setCurrentVaultRevisionNumber: (revisionNumber: number) => Promise<void>;
@@ -70,7 +72,6 @@ export const DbProvider: React.FC<{ children: React.ReactNode }> = ({ children }
*/
const request: StoreVaultRequest = {
vaultBlob: vaultResponse.vault.blob,
- derivedKey: derivedKey,
publicEmailDomainList: vaultResponse.vault.publicEmailDomainList,
privateEmailDomainList: vaultResponse.vault.privateEmailDomainList,
vaultRevisionNumber: vaultResponse.vault.currentRevisionNumber,
@@ -145,6 +146,20 @@ export const DbProvider: React.FC<{ children: React.ReactNode }> = ({ children }
}
}, [dbInitialized, checkStoredVault]);
+ /**
+ * Store encryption key in background worker.
+ */
+ const storeEncryptionKey = useCallback(async (encryptionKey: string) : Promise<void> => {
+ await sendMessage('STORE_ENCRYPTION_KEY', encryptionKey, 'background');
+ }, []);
+
+ /**
+ * Store encryption key derivation params in background worker.
+ */
+ const storeEncryptionKeyDerivationParams = useCallback(async (params: EncryptionKeyDerivationParams) : Promise<void> => {
+ await sendMessage('STORE_ENCRYPTION_KEY_DERIVATION_PARAMS', params, 'background');
+ }, []);
+
/**
* Clear database and remove from background worker, called when logging out.
*/
@@ -160,11 +175,13 @@ export const DbProvider: React.FC<{ children: React.ReactNode }> = ({ children }
dbInitialized,
dbAvailable,
initializeDatabase,
+ storeEncryptionKey,
+ storeEncryptionKeyDerivationParams,
clearDatabase,
getVaultMetadata,
setCurrentVaultRevisionNumber,
hasPendingMigrations,
- }), [sqliteClient, dbInitialized, dbAvailable, initializeDatabase, clearDatabase, getVaultMetadata, setCurrentVaultRevisionNumber, hasPendingMigrations]);
+ }), [sqliteClient, dbInitialized, dbAvailable, initializeDatabase, storeEncryptionKey, storeEncryptionKeyDerivationParams, clearDatabase, getVaultMetadata, setCurrentVaultRevisionNumber, hasPendingMigrations]);
return (
<DbContext.Provider value={contextValue}>
diff --git a/apps/browser-extension/src/entrypoints/popup/hooks/useVaultSync.ts b/apps/browser-extension/src/entrypoints/popup/hooks/useVaultSync.ts
index 6dbb0e3d2..219bcdc9d 100644
--- a/apps/browser-extension/src/entrypoints/popup/hooks/useVaultSync.ts
+++ b/apps/browser-extension/src/entrypoints/popup/hooks/useVaultSync.ts
@@ -6,6 +6,7 @@ import { useAuth } from '@/entrypoints/popup/context/AuthContext';
import { useDb } from '@/entrypoints/popup/context/DbContext';
import { useWebApi } from '@/entrypoints/popup/context/WebApiContext';
+import type { EncryptionKeyDerivationParams } from '@/utils/dist/shared/models/metadata';
import type { VaultResponse } from '@/utils/dist/shared/models/webapi';
/**
@@ -81,6 +82,19 @@ export const useVaultSync = () : {
return false;
}
+ // 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) {
+ /**
+ * 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
+ * longer valid and the user needs to re-authenticate. We trigger a logout but do not revoke tokens
+ * as these were already revoked by the server upon password change.
+ */
+ await webApi.logout(t('common.errors.passwordChanged'));
+ return false;
+ }
+
/*
* If we get here, it means we have a valid connection to the server.
* TODO: browser extension does not support offline mode yet.
diff --git a/apps/browser-extension/src/entrypoints/popup/pages/Login.tsx b/apps/browser-extension/src/entrypoints/popup/pages/Login.tsx
index 3493ce249..dff6f4f21 100644
--- a/apps/browser-extension/src/entrypoints/popup/pages/Login.tsx
+++ b/apps/browser-extension/src/entrypoints/popup/pages/Login.tsx
@@ -50,6 +50,66 @@ const Login: React.FC = () => {
const webApi = useWebApi();
const srpUtil = new SrpUtility(webApi);
+ /**
+ * Handle successful authentication by storing tokens and initializing the database
+ */
+ const handleSuccessfulAuth = async (
+ username: string,
+ token: string,
+ refreshToken: string,
+ passwordHashBase64: string,
+ loginResponse: LoginResponse
+ ) : Promise<void> => {
+ // Try to get latest vault manually providing auth token.
+ const vaultResponseJson = await webApi.authFetch<VaultResponse>('Vault', { method: 'GET', headers: {
+ 'Authorization': `Bearer ${token}`
+ } });
+
+ const vaultError = webApi.validateVaultResponse(vaultResponseJson, t);
+ if (vaultError) {
+ setError(vaultError);
+ hideLoading();
+ return;
+ }
+
+ // All is good. Store auth info which is required to make requests to the web API.
+ await authContext.setAuthTokens(username, token, refreshToken);
+
+ // Store the encryption key and derivation params separately
+ await dbContext.storeEncryptionKey(passwordHashBase64);
+ await dbContext.storeEncryptionKeyDerivationParams({
+ salt: loginResponse.salt,
+ encryptionType: loginResponse.encryptionType,
+ encryptionSettings: loginResponse.encryptionSettings
+ });
+
+ // Initialize the SQLite context with the new vault data.
+ const sqliteClient = await dbContext.initializeDatabase(vaultResponseJson, passwordHashBase64);
+
+ // Set logged in status to true which refreshes the app.
+ await authContext.login();
+
+ // If there are pending migrations, redirect to the upgrade page.
+ try {
+ if (await sqliteClient.hasPendingMigrations()) {
+ navigate('/upgrade', { replace: true });
+ hideLoading();
+ return;
+ }
+ } catch (err) {
+ await authContext.logout();
+ setError(err instanceof Error ? err.message : t('auth.errors.migrationError'));
+ hideLoading();
+ return;
+ }
+
+ // Navigate to reinitialize page which will take care of the proper redirect.
+ navigate('/reinitialize', { replace: true });
+
+ // Show app.
+ hideLoading();
+ };
+
useEffect(() => {
/**
* Load the client URL from the storage.
@@ -143,46 +203,14 @@ const Login: React.FC = () => {
throw new Error(t('auth.errors.noToken'));
}
- // Try to get latest vault manually providing auth token.
- const vaultResponseJson = await webApi.authFetch<VaultResponse>('Vault', { method: 'GET', headers: {
- 'Authorization': `Bearer ${validationResponse.token.token}`
- } });
-
- const vaultError = webApi.validateVaultResponse(vaultResponseJson, t);
- if (vaultError) {
- setError(vaultError);
- hideLoading();
- return;
- }
-
- // All is good. Store auth info which is required to make requests to the web API.
- await authContext.setAuthTokens(ConversionUtility.normalizeUsername(credentials.username), validationResponse.token.token, validationResponse.token.refreshToken);
-
- // Initialize the SQLite context with the new vault data.
- const sqliteClient = await dbContext.initializeDatabase(vaultResponseJson, passwordHashBase64);
-
- // Set logged in status to true which refreshes the app.
- await authContext.login();
-
- // If there are pending migrations, redirect to the upgrade page.
- try {
- if (await sqliteClient.hasPendingMigrations()) {
- navigate('/upgrade', { replace: true });
- hideLoading();
- return;
- }
- } catch (err) {
- await authContext.logout();
- setError(err instanceof Error ? err.message : t('auth.errors.migrationError'));
- hideLoading();
- return;
- }
-
- // Navigate to reinitialize page which will take care of the proper redirect.
- navigate('/reinitialize', { replace: true });
-
- // Show app.
- hideLoading();
+ // Handle successful authentication
+ await handleSuccessfulAuth(
+ ConversionUtility.normalizeUsername(credentials.username),
+ validationResponse.token.token,
+ validationResponse.token.refreshToken,
+ passwordHashBase64,
+ loginResponse
+ );
} catch (err) {
// Show API authentication errors as-is.
if (err instanceof ApiAuthError) {
@@ -227,43 +255,14 @@ const Login: React.FC = () => {
throw new Error(t('auth.errors.noToken'));
}
- // Try to get latest vault manually providing auth token.
- const vaultResponseJson = await webApi.authFetch<VaultResponse>('Vault', { method: 'GET', headers: {
- 'Authorization': `Bearer ${validationResponse.token.token}`
- } });
-
- const vaultError = webApi.validateVaultResponse(vaultResponseJson, t);
- if (vaultError) {
- setError(vaultError);
- hideLoading();
- return;
- }
-
- // All is good. Store auth info which is required to make requests to the web API.
- await authContext.setAuthTokens(ConversionUtility.normalizeUsername(credentials.username), validationResponse.token.token, validationResponse.token.refreshToken);
-
- // Initialize the SQLite context with the new vault data.
- const sqliteClient = await dbContext.initializeDatabase(vaultResponseJson, passwordHashBase64);
-
- // Set logged in status to true which refreshes the app.
- await authContext.login();
-
- // If there are pending migrations, redirect to the upgrade page.
- try {
- if (await sqliteClient.hasPendingMigrations()) {
- navigate('/upgrade', { replace: true });
- hideLoading();
- return;
- }
- } catch (err) {
- await authContext.logout();
- setError(err instanceof Error ? err.message : t('auth.errors.migrationError'));
- hideLoading();
- return;
- }
-
- // Navigate to reinitialize page which will take care of the proper redirect.
- navigate('/reinitialize', { replace: true });
+ // Handle successful authentication
+ await handleSuccessfulAuth(
+ ConversionUtility.normalizeUsername(credentials.username),
+ validationResponse.token.token,
+ validationResponse.token.refreshToken,
+ passwordHashBase64,
+ loginResponse
+ );
// Reset 2FA state and login response as it's no longer needed
setTwoFactorRequired(false);
@@ -271,7 +270,6 @@ const Login: React.FC = () => {
setPasswordHashString(null);
setPasswordHashBase64(null);
setLoginResponse(null);
- hideLoading();
} catch (err) {
// Show API authentication errors as-is.
console.error('2FA error:', err);
diff --git a/apps/browser-extension/src/entrypoints/popup/pages/Unlock.tsx b/apps/browser-extension/src/entrypoints/popup/pages/Unlock.tsx
index f457b90d7..54a278f13 100644
--- a/apps/browser-extension/src/entrypoints/popup/pages/Unlock.tsx
+++ b/apps/browser-extension/src/entrypoints/popup/pages/Unlock.tsx
@@ -46,7 +46,7 @@ const Unlock: React.FC = () => {
const statusResponse = await webApi.getStatus();
const statusError = webApi.validateStatusResponse(statusResponse);
if (statusError !== null) {
- await webApi.logout(t('common.apiErrors.' + statusError));
+ await webApi.logout(t('common.errors.' + statusError));
navigate('/logout');
}
setIsInitialLoading(false);
diff --git a/apps/browser-extension/src/i18n/locales/en.json b/apps/browser-extension/src/i18n/locales/en.json
index fd37b8c4e..e1c1f15a2 100644
--- a/apps/browser-extension/src/i18n/locales/en.json
+++ b/apps/browser-extension/src/i18n/locales/en.json
@@ -96,15 +96,10 @@
"unknownError": "An unknown error occurred",
"failedToStoreVault": "Failed to store vault",
"vaultNotAvailable": "Vault not available",
- "failedToGetVault": "Failed to get vault",
+ "failedToRetrieveData": "Failed to retrieve data",
"vaultIsLocked": "Vault is locked",
- "failedToGetCredentials": "Failed to get credentials",
- "failedToCreateIdentity": "Failed to create identity",
- "failedToGetDefaultEmailDomain": "Failed to get default email domain",
- "failedToGetDefaultIdentitySettings": "Failed to get default identity settings",
- "failedToGetPasswordSettings": "Failed to get password settings",
"failedToUploadVault": "Failed to upload vault",
- "failedToUploadVaultToServer": "Failed to upload new vault to server"
+ "passwordChanged": "Your password has changed since the last time you logged in. Please login again for security reasons."
},
"apiErrors": {
"UNKNOWN_ERROR": "An unknown error occurred. Please try again.",
@@ -202,23 +197,15 @@
"totpSecretPlaceholder": "Enter TOTP secret key",
"noCredentials": "No credentials found",
"noCredentialsDescription": "Add your first credential to get started",
- "searchCredentials": "Search credentials...",
"searchPlaceholder": "Search credentials...",
"welcomeTitle": "Welcome to AliasVault!",
"welcomeDescription": "To use the AliasVault browser extension: navigate to a website and use the AliasVault autofill popup to create a new credential.",
- "lastUsed": "Last used",
"createdAt": "Created",
"updatedAt": "Last updated",
"autofill": "Autofill",
"fillForm": "Fill Form",
- "copyUsername": "Copy Username",
- "openWebsite": "Open Website",
- "favorite": "Favorite",
- "unfavorite": "Remove from Favorites",
"deleteConfirm": "Are you sure you want to delete this credential?",
- "deleteSuccess": "Credential deleted successfully",
"saveSuccess": "Credential saved successfully",
- "copySuccess": "Copied to clipboard",
"tags": "Tags",
"addTag": "Add Tag",
"removeTag": "Remove Tag",
@@ -253,11 +240,7 @@
"birthDatePlaceholder": "YYYY-MM-DD",
"metadata": "Metadata",
"errors": {
- "invalidUrl": "Please enter a valid URL",
- "saveError": "Failed to save credential",
- "loadError": "Failed to load credentials",
- "deleteError": "Failed to delete credential",
- "copyError": "Failed to copy to clipboard"
+ "invalidUrl": "Please enter a valid URL"
},
"validation": {
"required": "This field is required",
diff --git a/apps/browser-extension/src/utils/WebApiService.ts b/apps/browser-extension/src/utils/WebApiService.ts
index 0fa631e9e..fd48fef26 100644
--- a/apps/browser-extension/src/utils/WebApiService.ts
+++ b/apps/browser-extension/src/utils/WebApiService.ts
@@ -262,7 +262,8 @@ export class WebApiService {
return {
clientVersionSupported: true,
serverVersion: '0.0.0',
- vaultRevision: 0
+ vaultRevision: 0,
+ srpSalt: ''
};
}
}
@@ -272,15 +273,15 @@ export class WebApiService {
*/
public validateStatusResponse(statusResponse: StatusResponse): string | null {
if (statusResponse.serverVersion === '0.0.0') {
- return 'errors.serverNotAvailable';
+ return 'serverNotAvailable';
}
if (!statusResponse.clientVersionSupported) {
- return 'errors.clientVersionNotSupported';
+ return 'clientVersionNotSupported';
}
if (!AppInfo.isServerVersionSupported(statusResponse.serverVersion)) {
- return 'errors.serverVersionNotSupported';
+ return 'serverVersionNotSupported';
}
return null;
diff --git a/apps/browser-extension/src/utils/dist/shared/models/webapi/index.d.ts b/apps/browser-extension/src/utils/dist/shared/models/webapi/index.d.ts
index 4e5f860e2..37b362306 100644
--- a/apps/browser-extension/src/utils/dist/shared/models/webapi/index.d.ts
+++ b/apps/browser-extension/src/utils/dist/shared/models/webapi/index.d.ts
@@ -65,6 +65,7 @@ type StatusResponse = {
clientVersionSupported: boolean;
serverVersion: string;
vaultRevision: number;
+ srpSalt: string;
};
/**
diff --git a/apps/browser-extension/src/utils/types/messaging/StoreVaultRequest.ts b/apps/browser-extension/src/utils/types/messaging/StoreVaultRequest.ts
index c3225b6e9..4a1a4421f 100644
--- a/apps/browser-extension/src/utils/types/messaging/StoreVaultRequest.ts
+++ b/apps/browser-extension/src/utils/types/messaging/StoreVaultRequest.ts
@@ -1,6 +1,5 @@
export type StoreVaultRequest = {
vaultBlob: string;
- derivedKey?: string;
publicEmailDomainList?: string[];
privateEmailDomainList?: string[];
vaultRevisionNumber?: number;