mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-10 19:21:01 +00:00
fix(login): check that password is non-empty or null to avoid crash
This commit is contained in:
1 parent
38b53c06dd
commit
ff28192785
2 files changed
+6
-1
No files matched your search
@@ -148,6 +148,11 @@
|
||||
return NO;
|
||||
if(_login && [_login length] == 0)
|
||||
return NO;
|
||||
|
||||
if(!_pwd)
|
||||
return NO;
|
||||
if(_pwd && [_pwd length] == 0)
|
||||
return NO;
|
||||
|
||||
loginDomain = nil;
|
||||
if(*_domain == nil || [*_domain length] == 0)
|
||||
|
||||
@@ -1218,7 +1218,7 @@ static const NSString *kJwtKey = @"jwt";
|
||||
response = [self responseWithStatus: 403
|
||||
andString: @"Missing 'oldPassword' parameter"];
|
||||
}
|
||||
else if (!newPassword)
|
||||
else if (!newPassword || (newPassword && [newPassword length] == 0))
|
||||
{
|
||||
response = [self responseWithStatus: 403
|
||||
andString: @"Missing 'newPassword' parameter"];
|
||||
|
||||
Reference in new issue
Block a user