diff --git a/MacPass/MPDocument.m b/MacPass/MPDocument.m
index 408f3e44..2f0c3e49 100644
--- a/MacPass/MPDocument.m
+++ b/MacPass/MPDocument.m
@@ -103,7 +103,8 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
#pragma mark Protection
- (BOOL)decryptWithPassword:(NSString *)password keyFileURL:(NSURL *)keyFileURL {
- self.password = password;
+ self.key = keyFileURL;
+ self.password = [password length] > 0 ? password : nil;
@try {
self.tree = [KdbReaderFactory load:[[self fileURL] path] withPassword:self.passwordHash];
}
@@ -139,8 +140,8 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
}
- (KdbPassword *)passwordHash {
- // TODO: Use defaults to determine Encoding?
- return [[[KdbPassword alloc] initWithPassword:self.password passwordEncoding:NSUTF8StringEncoding keyFile:[self.key path]] autorelease];
+
+ return [[[KdbPassword alloc] initWithPassword:self.password passwordEncoding:NSUTF8StringEncoding keyFileURL:self.key] autorelease];
}
+ (BOOL)autosavesInPlace
diff --git a/MacPass/MPPasswordEditViewController.m b/MacPass/MPPasswordEditViewController.m
index 05476469..57950674 100644
--- a/MacPass/MPPasswordEditViewController.m
+++ b/MacPass/MPPasswordEditViewController.m
@@ -52,7 +52,13 @@
MPDocument *document = [[NSDocumentController sharedDocumentController] documentForWindow:[[self view] window]];
if(document) {
document.key = [self.keyfilePathControl URL];
- document.password = [self.passwordTextField stringValue];
+ NSString *password = [self.passwordTextField stringValue];
+ if([password length] > 0) {
+ document.password = password;
+ }
+ else {
+ document.password = nil;
+ }
}
id mainWindowController = [[[self view] window] windowController];
[mainWindowController showEntries];
diff --git a/MacPass/MacPass-Info.plist b/MacPass/MacPass-Info.plist
index 36a4a928..91259c78 100644
--- a/MacPass/MacPass-Info.plist
+++ b/MacPass/MacPass-Info.plist
@@ -48,7 +48,7 @@
CFBundleSignature
????
CFBundleVersion
- 1065
+ 1090
LSMinimumSystemVersion
${MACOSX_DEPLOYMENT_TARGET}
NSHumanReadableCopyright
diff --git a/MiniKeePassLib b/MiniKeePassLib
index 8c5d2b62..5bda74e6 160000
--- a/MiniKeePassLib
+++ b/MiniKeePassLib
@@ -1 +1 @@
-Subproject commit 8c5d2b62097451a61298ce28d215e223763d679f
+Subproject commit 5bda74e60865f0f556e9991b671a83eed6cc9ad2