Fix a bug about remembering pgp passphrase
- Do not keep the wrong passphrase
This commit is contained in:
parent
e1c6d9c0d8
commit
20f2e22076
2 changed files with 5 additions and 1 deletions
|
|
@ -147,6 +147,8 @@ class PasswordDetailTableViewController: UITableViewController, UIGestureRecogni
|
|||
self.password = try self.passwordStore.decrypt(passwordEntity: self.passwordEntity!, requestPGPKeyPassphrase: self.requestPGPKeyPassphrase)
|
||||
} catch {
|
||||
DispatchQueue.main.async {
|
||||
// remove the wrong passphrase so that users could enter it next time
|
||||
self.passwordStore.pgpKeyPassphrase = nil
|
||||
let alert = UIAlertController(title: "Cannot Show Password", message: error.localizedDescription, preferredStyle: UIAlertControllerStyle.alert)
|
||||
alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: {(UIAlertAction) -> Void in
|
||||
self.navigationController!.popViewController(animated: true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue