aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionController.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-11-20 01:15:21 +0000
committerrowanbeentje <rowan@beent.je>2012-11-20 01:15:21 +0000
commit493e8a2543e0d62d9105e3edb257983f1831e6d4 (patch)
tree00c8a3df1ae5ba5744353882e7eaeac4815fbac9 /Source/SPConnectionController.m
parentd153e73f8c1ebe5fc472966a51307ae41b9ca750 (diff)
downloadsequelpro-493e8a2543e0d62d9105e3edb257983f1831e6d4.tar.gz
sequelpro-493e8a2543e0d62d9105e3edb257983f1831e6d4.tar.bz2
sequelpro-493e8a2543e0d62d9105e3edb257983f1831e6d4.zip
- When the connection interface is restored as a result of a connection attempt cancellation or failure, restore the passwords from their bulleted-out state. This addresses Issue #1497.
Diffstat (limited to 'Source/SPConnectionController.m')
-rw-r--r--Source/SPConnectionController.m10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m
index a8c9da8d..8cb08556 100644
--- a/Source/SPConnectionController.m
+++ b/Source/SPConnectionController.m
@@ -1575,7 +1575,15 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2,
[progressIndicator display];
[progressIndicatorText setHidden:YES];
[progressIndicatorText display];
-
+
+ // Update the password fields, restoring passwords that may have been bulletted out during connection
+ if (connectionKeychainItemName) {
+ [self setPassword:[keychain getPasswordForName:connectionKeychainItemName account:connectionKeychainItemAccount]];
+ }
+ if (connectionSSHKeychainItemName) {
+ [self setSshPassword:[keychain getPasswordForName:connectionSSHKeychainItemName account:connectionSSHKeychainItemAccount]];
+ }
+
// Re-enable favorites table view
[favoritesOutlineView setEnabled:YES];
[(NSView *)favoritesOutlineView display];