File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,21 @@ export class Accounts implements Module {
296296 state . state . encryption . updateEncryptionPassword ( key ) ;
297297 await state . dispatch ( "updateEntries" ) ;
298298
299+ // Encrypt any unencrypted entries.
300+ // Browser sync can cause unencrypted entries to show up.
301+ let needUpdateStorage = false ;
302+ for ( const entry of state . state . entries ) {
303+ if ( ! entry . encSecret ) {
304+ await entry . changeEncryption ( state . state . encryption ) ;
305+ needUpdateStorage = true ;
306+ }
307+ }
308+
309+ if ( needUpdateStorage ) {
310+ await EntryStorage . set ( state . state . entries ) ;
311+ await state . dispatch ( "updateEntries" ) ;
312+ }
313+
299314 if ( ! state . getters . currentlyEncrypted ) {
300315 chrome . runtime . sendMessage ( {
301316 action : "cachePassphrase" ,
You can’t perform that action at this time.
0 commit comments