fix(login): check that password is non-empty or null to avoid crash

This commit is contained in:
Hivert Quentin committed 2026-11-09 15:29:09 +01:00
1 parent 38b53c06dd
commit ff28192785
2 files changed
+6 -1

No files matched your search

+5
View File
@@ -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)
+1 -1
View File
@@ -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"];