Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
#2437 disable keychain access when passwords are being sent as cleartext
  • Loading branch information
abhibeckert committed Mar 3, 2017
1 parent fc4ff91 commit 9c5357a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Source/SPKeychain.m
Expand Up @@ -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.
*/
Expand Down

0 comments on commit 9c5357a

Please sign in to comment.