fix logging of password on Login
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -96,13 +96,15 @@ func Login(c *gin.Context) {
|
||||
u.UserName = input.Username
|
||||
u.Password = input.Password
|
||||
|
||||
log.Printf("Login checking username '%s' and password '%s'\n", u.UserName, u.Password)
|
||||
log.Printf("Login checking username '%s' and password length '%d'\n", u.UserName, len(u.Password))
|
||||
|
||||
token, err := models.LoginCheck(u.UserName, u.Password)
|
||||
|
||||
if err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": "username or password is incorrect."})
|
||||
return
|
||||
} else {
|
||||
log.Printf("Login verified, returning token '%s'\n", token)
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{"access_token": token})
|
||||
|
Reference in New Issue
Block a user