File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# v152.0 (In progress)
22
3+ ## ✨ What's New ✨
4+
35### Breach Alerts
4- - New component: `breach-alerts` for storing and retrieving breach alert dismissals by breach ID.
6+ * New component: `breach-alerts` for storing and retrieving breach alert dismissals by breach ID.
7+
8+ ### Logins
9+ * `run_maintenance()` now optionally deletes undecryptable logins (https://bugzilla.mozilla.org/show_bug.cgi?id=2007416)
510
611[Full Changelog](In progress)
712
Original file line number Diff line number Diff line change @@ -302,11 +302,16 @@ interface LoginStore {
302302 /// This is intended to be run during idle time and will take steps / to clean up / shrink the
303303 /// database.
304304 [Throws=LoginsApiError]
305- void run_maintenance();
305+ void run_maintenance(optional RunMaintenanceOptions? options=null );
306306
307307 [Self=ByArc]
308308 void register_with_sync_manager();
309309
310310 [Self=ByArc]
311311 void shutdown();
312312};
313+
314+ dictionary RunMaintenanceOptions {
315+ // Wipe un-decryptable logins. These will hopefully come back on the next sync.
316+ boolean delete_undecryptable_records_for_remote_replacement=true;
317+ };
Original file line number Diff line number Diff line change @@ -330,9 +330,13 @@ impl LoginStore {
330330 }
331331
332332 #[ handle_error( Error ) ]
333- pub fn run_maintenance ( & self ) -> ApiResult < ( ) > {
333+ pub fn run_maintenance ( & self , options : Option < RunMaintenanceOptions > ) -> ApiResult < ( ) > {
334334 let conn = self . lock_db ( ) ?;
335+ let options = options. unwrap_or_default ( ) ;
335336 run_maintenance ( & conn) ?;
337+ if options. delete_undecryptable_records_for_remote_replacement {
338+ conn. delete_undecryptable_records_for_remote_replacement ( conn. encdec . as_ref ( ) ) ?;
339+ }
336340 Ok ( ( ) )
337341 }
338342
@@ -364,6 +368,18 @@ impl LoginStore {
364368 }
365369}
366370
371+ pub struct RunMaintenanceOptions {
372+ pub delete_undecryptable_records_for_remote_replacement : bool ,
373+ }
374+
375+ impl Default for RunMaintenanceOptions {
376+ fn default ( ) -> Self {
377+ Self {
378+ delete_undecryptable_records_for_remote_replacement : true ,
379+ }
380+ }
381+ }
382+
367383#[ cfg( not( feature = "keydb" ) ) ]
368384#[ cfg( test) ]
369385mod tests {
You can’t perform that action at this time.
0 commit comments