From df7720cd97dcbeeb1ba3a74c2bc2dae2bf4276cd Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Tue, 4 Jan 2011 23:04:07 +0000 Subject: - Fix SSH tunnels for connections with non-Latin characters in their name - If SSH tunnel password lookups fail, fall back to asking the user for the password - Don't reset keychain IDs across documents if not set; this fixes problems re-saving .spfs or duplicating chains of tabs --- Source/SPConnectionController.m | 3 --- 1 file changed, 3 deletions(-) (limited to 'Source/SPConnectionController.m') diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index a4adcf92..316d5258 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -520,9 +520,6 @@ if ([self valueForKeyPath:@"selectedFavorite.id"]) { [tableDocument setKeychainID:[[self valueForKeyPath:@"selectedFavorite.id"] stringValue]]; } - else { - [tableDocument setKeychainID:@""]; - } // Pass the connection to the table document, allowing it to set // up the other classes and the rest of the interface. -- cgit v1.2.3 From ba66d86c0006f8f9c8f479511277e57cddbdb318 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Wed, 5 Jan 2011 00:27:03 +0000 Subject: - Add .crt to certificate/SSL certificate extension list --- Source/SPConnectionController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/SPConnectionController.m') diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index 316d5258..b2560b84 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -574,7 +574,7 @@ [self setSslCertificateFileLocation:nil]; return; } - permittedFileTypes = [NSArray arrayWithObjects:@"pem", @"cert", @"", nil]; + permittedFileTypes = [NSArray arrayWithObjects:@"pem", @"cert", @"crt", @"", nil]; [openPanel setAccessoryView:sslCertificateLocationHelp]; // SSL CA certificate file location: @@ -583,7 +583,7 @@ [self setSslCACertFileLocation:nil]; return; } - permittedFileTypes = [NSArray arrayWithObjects:@"pem", @"cert", @"", nil]; + permittedFileTypes = [NSArray arrayWithObjects:@"pem", @"cert", @"crt", @"", nil]; [openPanel setAccessoryView:sslCACertLocationHelp]; } -- cgit v1.2.3 From 1bb16aa9943b686f4bf0b5adb3fe42495cf74f35 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Thu, 6 Jan 2011 00:25:15 +0000 Subject: - Now the connection process is threaded, remove manual display calls when updating interface details to prevent glitch drawing --- Source/SPConnectionController.m | 5 ----- 1 file changed, 5 deletions(-) (limited to 'Source/SPConnectionController.m') diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index b2560b84..3558d484 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -252,15 +252,10 @@ [favoritesTable setEnabled:NO]; [addToFavoritesButton setHidden:YES]; - [addToFavoritesButton display]; [helpButton setHidden:YES]; - [helpButton display]; [connectButton setEnabled:NO]; - [connectButton display]; [progressIndicator startAnimation:self]; - [progressIndicator display]; [progressIndicatorText setHidden:NO]; - [progressIndicatorText display]; // Start the current tab's progress indicator [tableDocument setIsProcessing:YES]; -- cgit v1.2.3 From 870da55b26764076d657ef9625e8798f538304cd Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Mon, 10 Jan 2011 00:51:27 +0000 Subject: - Track the keychain ID of the favourite in the connection controller, fixing errors when amending favourites in the connection view and thereafter saving as .spf or duplicating connections --- Source/SPConnectionController.m | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Source/SPConnectionController.m') diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index 3558d484..c521213c 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -89,6 +89,7 @@ tableDocument = theTableDocument; databaseConnectionSuperview = [tableDocument databaseView]; databaseConnectionView = [tableDocument valueForKey:@"contentViewSplitter"]; + connectionKeychainID = nil; connectionKeychainItemName = nil; connectionKeychainItemAccount = nil; connectionSSHKeychainItemName = nil; @@ -173,6 +174,7 @@ if (favorites) [favorites release]; if (mySQLConnection) [mySQLConnection release]; if (sshTunnel) [sshTunnel setConnectionStateChangeSelector:nil delegate:nil], [sshTunnel disconnect], [sshTunnel release]; + if (connectionKeychainID) [connectionKeychainID release]; if (connectionKeychainItemName) [connectionKeychainItemName release]; if (connectionKeychainItemAccount) [connectionKeychainItemAccount release]; if (connectionSSHKeychainItemName) [connectionSSHKeychainItemName release]; @@ -512,9 +514,7 @@ for (NSInteger i = 0; i < [toolbarItems count]; i++) [[toolbarItems objectAtIndex:i] setEnabled:YES]; // Set keychain id for saving SPF files - if ([self valueForKeyPath:@"selectedFavorite.id"]) { - [tableDocument setKeychainID:[[self valueForKeyPath:@"selectedFavorite.id"] stringValue]]; - } + if (connectionKeychainID) [tableDocument setKeychainID:connectionKeychainID]; // Pass the connection to the table document, allowing it to set // up the other classes and the rest of the interface. @@ -884,6 +884,7 @@ automaticFavoriteSelection = YES; // Clear the keychain referral items as appropriate + if (connectionKeychainID) [connectionKeychainID release], connectionKeychainID = nil; if (connectionKeychainItemName) [connectionKeychainItemName release], connectionKeychainItemName = nil; if (connectionKeychainItemAccount) [connectionKeychainItemAccount release], connectionKeychainItemAccount = nil; if (connectionSSHKeychainItemName) [connectionSSHKeychainItemName release], connectionSSHKeychainItemName = nil; @@ -933,6 +934,8 @@ [connectionKeychainItemAccount release], connectionKeychainItemAccount = nil; } + if ([self valueForKeyPath:@"selectedFavorite.id"]) connectionKeychainID = [[[self valueForKeyPath:@"selectedFavorite.id"] stringValue] retain]; + // And the same for the SSH password connectionSSHKeychainItemName = [[keychain nameForSSHForFavoriteName:[self valueForKeyPath:@"selectedFavorite.name"] id:[self valueForKeyPath:@"selectedFavorite.id"]] retain]; connectionSSHKeychainItemAccount = [[keychain accountForSSHUser:[self valueForKeyPath:@"selectedFavorite.sshUser"] sshHost:[self valueForKeyPath:@"selectedFavorite.sshHost"]] retain]; -- cgit v1.2.3