aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbhi Beckert <abhi@abhibeckert.com>2017-03-03 15:07:37 +1000
committerAbhi Beckert <abhi@abhibeckert.com>2017-03-03 15:07:37 +1000
commit9c5357a28e27b74a6df7bfeeb24015073d5993e5 (patch)
treec0ac84fe78c01fb1e4385e59319931abe5528b65
parentfc4ff91f563d78b7ed847c795c6e1a96a1277653 (diff)
downloadsequelpro-9c5357a28e27b74a6df7bfeeb24015073d5993e5.tar.gz
sequelpro-9c5357a28e27b74a6df7bfeeb24015073d5993e5.tar.bz2
sequelpro-9c5357a28e27b74a6df7bfeeb24015073d5993e5.zip
#2437 disable keychain access when passwords are being sent as cleartext
-rw-r--r--Source/SPKeychain.m17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/SPKeychain.m b/Source/SPKeychain.m
index 066f4011..49e2de69 100644
--- a/Source/SPKeychain.m
+++ b/Source/SPKeychain.m
@@ -38,6 +38,23 @@
@implementation SPKeychain
+- (id)init
+{
+ if (!(self = [super init])) {
+ return nil;
+ }
+
+ NSString *cleartext = [NSProcessInfo processInfo].environment[@"LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN"];
+ if (cleartext != nil) {
+ NSLog(@"LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN is set. Disabling keychain access. See Issue #2437");
+
+ [self release];
+ return nil;
+ }
+
+ return self;
+}
+
/**
* Add the supplied password to the user's Keychain using the supplied name and account.
*/