File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
packages/profile-sync-controller/src/shared/encryption Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -228,12 +228,16 @@ class EncryptorDecryptor {
228
228
}
229
229
230
230
doesEntryNeedReEncryption ( encryptedDataStr : string ) : boolean {
231
- const doesEntryHaveRandomSalt =
232
- this . getSalt ( encryptedDataStr ) . toString ( ) !== SHARED_SALT . toString ( ) ;
233
- const doesEntryUseOldScryptN =
234
- JSON . parse ( encryptedDataStr ) . o ?. N !== SCRYPT_N_V2 ;
235
-
236
- return doesEntryHaveRandomSalt || doesEntryUseOldScryptN ;
231
+ try {
232
+ const doesEntryHaveRandomSalt =
233
+ this . getSalt ( encryptedDataStr ) . toString ( ) !== SHARED_SALT . toString ( ) ;
234
+ const doesEntryUseOldScryptN =
235
+ JSON . parse ( encryptedDataStr ) . o ?. N !== SCRYPT_N_V2 ;
236
+
237
+ return doesEntryHaveRandomSalt || doesEntryUseOldScryptN ;
238
+ } catch {
239
+ return false ;
240
+ }
237
241
}
238
242
239
243
#encrypt( plaintext : Uint8Array , key : Uint8Array ) : Uint8Array {
You can’t perform that action at this time.
0 commit comments