Updated to current KeePassKit. Fixed nil assertion when using invalid OTP parameters

This commit is contained in:
Michael Starke
2021-01-05 18:12:28 +01:00
parent 8c017e65c2
commit 62032cd7d0
3 changed files with 5 additions and 4 deletions

View File

@@ -56,7 +56,8 @@
if(showTOTP) {
self.generator = [[KPKTimeOTPGenerator alloc] initWithEntry:entry];
self.generator.time = NSDate.date.timeIntervalSince1970;
self.toptValueTextField.stringValue = self.generator.string;
NSString *stringValue = self.generator.string;
self.toptValueTextField.stringValue = stringValue ? stringValue : @"";
NSString *template = NSLocalizedString(@"TOTP_REMAINING_TIME_%ld_SECONDS", @"Time in seconds remaining for a valid TOTP string, format should be %ld");