Skip to content

Commit

Permalink
Generic alpha log error message for failed ACL login (#6848) (#6851)
Browse files Browse the repository at this point in the history
* In case of an invalid login request, a generic error message will be printed in alpha logs

(cherry picked from commit 7088d59)
  • Loading branch information
OmarAyo authored Nov 5, 2020
1 parent 8634314 commit 1a159e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions edgraph/access_ee.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (s *Server) authenticateLogin(ctx context.Context, request *api.LoginReques

if user == nil {
return nil, errors.Errorf("unable to authenticate through refresh token: "+
"user not found for id %v", userId)
"invalid username or password")
}

glog.Infof("Authenticated user %s through refresh token", userId)
Expand All @@ -143,10 +143,10 @@ func (s *Server) authenticateLogin(ctx context.Context, request *api.LoginReques

if user == nil {
return nil, errors.Errorf("unable to authenticate through password: "+
"user not found for id %v", request.Userid)
"invalid username or passowrd")
}
if !user.PasswordMatch {
return nil, errors.Errorf("password mismatch for user: %v", request.Userid)
return nil, x.ErrorInvalidLogin
}
return user, nil
}
Expand Down

0 comments on commit 1a159e3

Please sign in to comment.