auth: check username/password is empty string by corgiboygsj · Pull Request #1402 · apache/hugegraph

@corgiboygsj

@corgiboygsj

@CLAassistant

CLA assistant check
All committers have signed the CLA.

javeme


if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) {
throw new BadRequestException(
"Invalid syntax for username and password");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

align with BadRequestException

final String password = values[1];
assert username != null && password != null;

if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also check for user-create

@corgiboygsj

@codecov

javeme

Linary