mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-06 20:37:14 +00:00
Apply patches for bug #2060
This commit is contained in:
1 parent
fe09a7969d
commit
6ad59a8481
4 files changed
+100
-62
No files matched your search
@@ -187,7 +187,10 @@
|
||||
pass = [plainPassword asCryptedPassUsingScheme: _userPasswordAlgorithm];
|
||||
|
||||
if (pass == nil)
|
||||
[self errorWithFormat: @"Unsupported user-password algorithm: %@", _userPasswordAlgorithm];
|
||||
{
|
||||
[self errorWithFormat: @"Unsupported user-password algorithm: %@", _userPasswordAlgorithm];
|
||||
return nil;
|
||||
}
|
||||
|
||||
if (_prependPasswordScheme)
|
||||
result = [NSString stringWithFormat: @"{%@}%@", _userPasswordAlgorithm, pass];
|
||||
@@ -308,18 +311,20 @@
|
||||
NSString *sqlstr;
|
||||
BOOL didChange;
|
||||
BOOL isOldPwdOk;
|
||||
|
||||
|
||||
isOldPwdOk = NO;
|
||||
didChange = NO;
|
||||
|
||||
|
||||
// Verify current password
|
||||
isOldPwdOk = [self checkLogin:login password:oldPassword perr:perr expire:0 grace:0];
|
||||
|
||||
|
||||
if (isOldPwdOk)
|
||||
{
|
||||
// Encrypt new password
|
||||
NSString *encryptedPassword = [self _encryptPassword: newPassword];
|
||||
|
||||
if(encryptedPassword == nil)
|
||||
return NO;
|
||||
|
||||
// Save new password
|
||||
login = [login stringByReplacingString: @"'" withString: @"''"];
|
||||
cm = [GCSChannelManager defaultChannelManager];
|
||||
|
||||
Reference in new issue
Block a user