Merge pull request #11415 from YoyinZyc/automated-cherry-pick-of-#11413-upstream-release-3.4

Automated cherry pick of #11413 to release-3.4
This commit is contained in:
Jingyi Hu
2019-12-02 14:51:47 -08:00
committed by GitHub

View File

@@ -306,7 +306,7 @@ func (as *authStore) Authenticate(ctx context.Context, username, password string
return nil, ErrAuthFailed
}
if user.Options.NoPassword {
if user.Options != nil && user.Options.NoPassword {
return nil, ErrAuthFailed
}
@@ -344,7 +344,7 @@ func (as *authStore) CheckPassword(username, password string) (uint64, error) {
return 0, ErrAuthFailed
}
if user.Options.NoPassword {
if user.Options != nil && user.Options.NoPassword {
return 0, ErrAuthFailed
}