diff options
author | rowanbeentje <rowan@beent.je> | 2011-05-29 15:38:17 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2011-05-29 15:38:17 +0000 |
commit | e345cd9a9a4d825132c97ac023101e538ea911d3 (patch) | |
tree | dcb3e464982c0834a2fc692627a3189f3a510b6f /Source/SPDatabaseDocument.m | |
parent | 3b5ac2fb159a810778c7fd65b92b653d16fd86a5 (diff) | |
download | sequelpro-e345cd9a9a4d825132c97ac023101e538ea911d3.tar.gz sequelpro-e345cd9a9a4d825132c97ac023101e538ea911d3.tar.bz2 sequelpro-e345cd9a9a4d825132c97ac023101e538ea911d3.zip |
- Ensure blank passwords for MySQL connections are passed in as NULL instead of an empty string; the MySQL manual suggests that maybe we should be doing this, and it may address Issue #1065.
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r-- | Source/SPDatabaseDocument.m | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index 4d6e4bda..20379ede 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -4143,11 +4143,8 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; if (includePasswords) { NSString *pw = [self keychainPasswordForConnection:nil]; - if (![pw length]) pw = [connectionController password]; - if (pw) - [connection setObject:pw forKey:@"password"]; - else - [connection setObject:@"" forKey:@"password"]; + if (!pw) pw = [connectionController password]; + if (pw) [connection setObject:pw forKey:@"password"]; if ([connectionController type] == SPSSHTunnelConnection) { NSString *sshpw = [self keychainPasswordForSSHConnection:nil]; |