mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-17 20:45:56 +00:00
(fix) make sure to use crypt as the scheme for md5/sha256/sha512 (fixes #4137)
This commit is contained in:
@@ -606,6 +606,13 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses
|
||||
return nil;
|
||||
}
|
||||
|
||||
if ([_userPasswordAlgorithm caseInsensitiveCompare: @"md5-crypt"] == NSOrderedSame ||
|
||||
[_userPasswordAlgorithm caseInsensitiveCompare: @"sha256-crypt"] == NSOrderedSame ||
|
||||
[_userPasswordAlgorithm caseInsensitiveCompare: @"sha512-crypt"] == NSOrderedSame)
|
||||
{
|
||||
_userPasswordAlgorithm = @"crypt";
|
||||
}
|
||||
|
||||
return [NSString stringWithFormat: @"{%@}%@", _userPasswordAlgorithm, pass];
|
||||
}
|
||||
|
||||
|
||||
@@ -197,6 +197,13 @@
|
||||
return nil;
|
||||
}
|
||||
|
||||
if ([_userPasswordAlgorithm caseInsensitiveCompare: @"md5-crypt"] == NSOrderedSame ||
|
||||
[_userPasswordAlgorithm caseInsensitiveCompare: @"sha256-crypt"] == NSOrderedSame ||
|
||||
[_userPasswordAlgorithm caseInsensitiveCompare: @"sha512-crypt"] == NSOrderedSame)
|
||||
{
|
||||
_userPasswordAlgorithm = @"crypt";
|
||||
}
|
||||
|
||||
if (_prependPasswordScheme)
|
||||
result = [NSString stringWithFormat: @"{%@}%@", _userPasswordAlgorithm, pass];
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user