mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-23 05:49:31 +00:00
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.sogo
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user