diff options
author | rowanbeentje <rowan@beent.je> | 2010-04-06 21:58:30 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-04-06 21:58:30 +0000 |
commit | 08db4c1ac43c11f8d516a734b600ab9a393ff3e5 (patch) | |
tree | 8f4fd14413d088d0859aa8d94555f0191052d2d4 /Source/TableDocument.m | |
parent | d5b668897b69d05a1e564f7b23ed17621dc80d8c (diff) | |
download | sequelpro-08db4c1ac43c11f8d516a734b600ab9a393ff3e5.tar.gz sequelpro-08db4c1ac43c11f8d516a734b600ab9a393ff3e5.tar.bz2 sequelpro-08db4c1ac43c11f8d516a734b600ab9a393ff3e5.zip |
- Improve .spf handling of blank passwords; allow empty passwords to be saved (this addresses http://spbug/l/75), and correctly restore empty passwords
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r-- | Source/TableDocument.m | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 14af042e..bd12b9bf 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -273,8 +273,8 @@ [connectionController setSshUser:@""]; [connectionController setSshPort:@""]; [connectionController setDatabase:@""]; - [connectionController setPassword:@""]; - [connectionController setSshPassword:@""]; + [connectionController setPassword:nil]; + [connectionController setSshPassword:nil]; // Deselect all favorites [[connectionController valueForKeyPath:@"favoritesTable"] deselectAll:connectionController]; @@ -2877,8 +2877,8 @@ if([[spfDocData_temp objectForKey:@"save_password"] boolValue]) { NSString *pw = [self keychainPasswordForConnection:nil]; if(![pw length]) pw = [connectionController password]; - [connection setObject:pw forKey:@"password"]; - if([connectionController type] == SPSSHTunnelConnection) + if (pw) [connection setObject:pw forKey:@"password"]; + if([connectionController type] == SPSSHTunnelConnection && [connectionController sshPassword]) [connection setObject:[connectionController sshPassword] forKey:@"ssh_password"]; } |