Sanity check if the encrypted password isn't found in one source, to avoid a crash when invoking crypt() on it
Monotone-Parent: cbeb8ed4edd6c44d422f9251785ee9bfad432e71 Monotone-Revision: 4a37382e84f4a00ccbbc0542ef0ae4a99a954cdd Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2011-03-29T14:34:14 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
c74fe21484
commit
cb76677762
|
@ -133,6 +133,9 @@
|
|||
- (BOOL) _isPassword: (NSString *) plainPassword
|
||||
equalTo: (NSString *) encryptedPassword
|
||||
{
|
||||
if (!plainPassword || !encryptedPassword)
|
||||
return NO;
|
||||
|
||||
if ([_userPasswordAlgorithm caseInsensitiveCompare: @"none"] == NSOrderedSame)
|
||||
{
|
||||
return [plainPassword isEqualToString: encryptedPassword];
|
||||
|
|
Loading…
Reference in New Issue