-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #204 from cozy/fix/prevent_crash_shared_orgs_no_key
feat: Prevent crash web vault contains organizations with no key
- Loading branch information
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { CryptoService as CryptoServiceBase } from '../@bitwarden/jslib/services/crypto.service' | ||
|
||
export class CryptoService extends CryptoServiceBase { | ||
constructor( | ||
storageService, | ||
secureStorageService, | ||
cryptoFunctionService, | ||
platformUtilService | ||
) { | ||
super( | ||
storageService, | ||
secureStorageService, | ||
cryptoFunctionService, | ||
platformUtilService | ||
) | ||
} | ||
|
||
setOrgKeys(orgs) { | ||
const validOrgs = orgs.filter(org => org.key !== '') | ||
|
||
return super.setOrgKeys(validOrgs) | ||
} | ||
} |