Fix the "clearing passwords in 45s" function
- Copied passwords in the extension are not cleaned.
This commit is contained in:
parent
f86a5eee65
commit
a4efe57db9
7 changed files with 66 additions and 13 deletions
|
|
@ -391,7 +391,7 @@ class PasswordDetailTableViewController: UITableViewController, UIGestureRecogni
|
|||
|
||||
// copy HOTP to pasteboard (will update counter)
|
||||
if let plainPassword = password!.getNextHotp() {
|
||||
Utils.copyToPasteboard(textToCopy: plainPassword)
|
||||
SecurePasteboard.shared.copy(textToCopy: plainPassword)
|
||||
}
|
||||
|
||||
// commit the change of HOTP counter
|
||||
|
|
@ -413,7 +413,7 @@ class PasswordDetailTableViewController: UITableViewController, UIGestureRecogni
|
|||
}
|
||||
return;
|
||||
}
|
||||
Utils.copyToPasteboard(textToCopy: password?.password)
|
||||
SecurePasteboard.shared.copy(textToCopy: password?.password)
|
||||
UIApplication.shared.open(url, options: [:], completionHandler: nil)
|
||||
}
|
||||
|
||||
|
|
@ -480,7 +480,7 @@ class PasswordDetailTableViewController: UITableViewController, UIGestureRecogni
|
|||
|
||||
override func tableView(_ tableView: UITableView, performAction action: Selector, forRowAt indexPath: IndexPath, withSender sender: Any?) {
|
||||
if action == #selector(copy(_:)) {
|
||||
Utils.copyToPasteboard(textToCopy: tableData[indexPath.section].item[indexPath.row].content)
|
||||
SecurePasteboard.shared.copy(textToCopy: tableData[indexPath.section].item[indexPath.row].content)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ class PasswordEditorTableViewController: UITableViewController, FillPasswordTabl
|
|||
}
|
||||
let length = passwordLengthCell?.roundedValue ?? 0
|
||||
let plainPassword = Utils.generatePassword(length: length)
|
||||
Utils.copyToPasteboard(textToCopy: plainPassword)
|
||||
SecurePasteboard.shared.copy(textToCopy: plainPassword)
|
||||
|
||||
// update tableData so to make sure reloadData() works correctly
|
||||
tableData[passwordSection][0][PasswordEditorCellKey.content] = plainPassword
|
||||
|
|
|
|||
|
|
@ -370,7 +370,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
|
|||
do {
|
||||
decryptedPassword = try self.passwordStore.decrypt(passwordEntity: passwordEntity, requestPGPKeyPassphrase: self.requestPGPKeyPassphrase)
|
||||
DispatchQueue.main.async {
|
||||
Utils.copyToPasteboard(textToCopy: decryptedPassword?.password)
|
||||
SecurePasteboard.shared.copy(textToCopy: decryptedPassword?.password)
|
||||
SVProgressHUD.showSuccess(withStatus: "Password copied, and will be cleared in 45 seconds.")
|
||||
SVProgressHUD.dismiss(withDelay: 0.6)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue