Check if username and password is empty during registration. (#225)

This commit is contained in:
Kavin 2022-03-16 15:08:18 +00:00 committed by GitHub
parent 43d6dc93c0
commit a4b6e1f804
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -520,7 +520,7 @@ public class ResponseHelper {
if (Constants.DISABLE_REGISTRATION)
return Constants.mapper.writeValueAsBytes(new DisabledRegistrationResponse());
if (user == null || pass == null)
if (StringUtils.isBlank(user) || StringUtils.isBlank(pass))
return Constants.mapper.writeValueAsBytes(new InvalidRequestResponse());
user = user.toLowerCase();