Fixed some rare crashes.
[FIXED] Crash for users with no name. [FIXED] Crash when copying an element with no content.
This commit is contained in:
Binary file not shown.
Binary file not shown.
2
External/Pearl
vendored
2
External/Pearl
vendored
Submodule External/Pearl updated: bf632ec1c6...4125775291
@@ -16,8 +16,10 @@
|
|||||||
static NSDictionary *keyQuery(MPUserEntity *user) {
|
static NSDictionary *keyQuery(MPUserEntity *user) {
|
||||||
|
|
||||||
return [PearlKeyChain createQueryForClass:kSecClassGenericPassword
|
return [PearlKeyChain createQueryForClass:kSecClassGenericPassword
|
||||||
attributes:@{(__bridge id)kSecAttrService: @"Saved Master Password",
|
attributes:@{
|
||||||
(__bridge id)kSecAttrAccount: user.name}
|
(__bridge id)kSecAttrService: @"Saved Master Password",
|
||||||
|
(__bridge id)kSecAttrAccount: IfNotNilElse(user.name, @"")
|
||||||
|
}
|
||||||
matches:nil];
|
matches:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -485,11 +485,13 @@
|
|||||||
|
|
||||||
- (IBAction)copyContent {
|
- (IBAction)copyContent {
|
||||||
|
|
||||||
if (!self.activeElement)
|
id content = self.activeElement.content;
|
||||||
|
if (!content)
|
||||||
|
// Nothing to copy.
|
||||||
return;
|
return;
|
||||||
|
|
||||||
inf(@"Copying password for: %@", self.activeElement.name);
|
inf(@"Copying password for: %@", self.activeElement.name);
|
||||||
[UIPasteboard generalPasteboard].string = [self.activeElement.content description];
|
[UIPasteboard generalPasteboard].string = [content description];
|
||||||
|
|
||||||
[self showContentTip:@"Copied!" withIcon:nil];
|
[self showContentTip:@"Copied!" withIcon:nil];
|
||||||
|
|
||||||
|
@@ -554,6 +554,10 @@
|
|||||||
|
|
||||||
- (void)tryMasterPassword {
|
- (void)tryMasterPassword {
|
||||||
|
|
||||||
|
if (!self.selectedUser)
|
||||||
|
// No user selected, can't try sign-in.
|
||||||
|
return;
|
||||||
|
|
||||||
[self setSpinnerActive:YES];
|
[self setSpinnerActive:YES];
|
||||||
|
|
||||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||||
|
Reference in New Issue
Block a user