Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash on SecureVault corruption #417

Merged
merged 7 commits into from
Feb 20, 2022
Merged

Conversation

mallexxx
Copy link
Collaborator

@mallexxx mallexxx commented Feb 3, 2022

Task/Issue URL: https://app.asana.com/0/1177771139624306/1201649423461236/f
Tech Design URL:
CC: @samsymons

Description:
Fixes crash and data import on SecureVault corruption

Steps to test this PR:
0. Corrupt database file at ~/Library/Containers/com.duckduckgo.macos.browser[.debug]/Data/Library/Application Support/Vault/Vault.db

  1. Disable file recreation (just add throw errorat DefaultDatabaseProvider.swift:75)
  2. Validate Data Import menu item doesn't crash and bookmark import flow still works and errors are displayed where appropriate
  3. Remove throw error, validate database file is recreated and logins/data import work normally

see also: duckduckgo/BrowserServicesKit#60


Internal references:

Software Engineering Expectations
Technical Design Template
When ready for review, remember to post the PR in MM

@mallexxx mallexxx force-pushed the alex/fix-secure-vault-crash branch from 8b11d5c to 775917a Compare February 3, 2022 06:10
@samsymons
Copy link
Collaborator

Btw, I have not been ignoring this review, I'm just monitoring the discussion on duckduckgo/BrowserServicesKit#60. :)

Copy link
Collaborator

@bwaresiak bwaresiak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested changes from BSK: Bookmark/Login import, startup, corrupted DB and lack of storage space, looks good to me!

@samsymons since @mallexxx is out, can you double check and merge if it looks good to you?

Copy link
Collaborator

@samsymons samsymons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I'll merge the BSK PR and put it into a release, then update this PR with the new tag and merge.

@samsymons samsymons merged commit 6288fa0 into develop Feb 20, 2022
@samsymons samsymons deleted the alex/fix-secure-vault-crash branch February 20, 2022 23:01
samsymons added a commit that referenced this pull request Feb 21, 2022
# By Alexey Martemyanov (2) and others
# Via GitHub (1) and Tomas Strba (1)
* develop:
  Fix crash on SecureVault corruption (#417)
  ensure app usage is sent (#429)
  Fix non-debug builds (#428)
  new tds url (#430)
  Sparkle 1.27.1 (#411)
  Disable CVDisplayLing logging (#421)
  Version 0.18.7

# Conflicts:
#	DuckDuckGo/Menus/MainMenuActions.swift
samsymons added a commit that referenced this pull request Feb 21, 2022
* develop:
  Fix video fullscreen exit crash (#295)
  Set BrowserServicesKit to 8.0.2.
  Fix crash on SecureVault corruption (#417)
  ensure app usage is sent (#429)
samsymons added a commit that referenced this pull request Feb 21, 2022
…ntication

* sam/logins-filtering-and-sorting:
  Fix video fullscreen exit crash (#295)
  Set BrowserServicesKit to 8.0.2.
  Fix crash on SecureVault corruption (#417)
  ensure app usage is sent (#429)
jonathanKingston pushed a commit that referenced this pull request Feb 25, 2022
* Fix crash and data import on Secure Vault corruption

* update BSK rev

* update BSK rev

* SecureVault error reporting

* Update to BrowserServicesKit 8.0.1.

Co-authored-by: Sam Symons <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants