remove some logging containing hashes
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-16 17:26:04 +11:00
parent 092fe32baf
commit 5f63ee235b
2 changed files with 6 additions and 4 deletions

View File

@@ -210,7 +210,8 @@ func Login(c *gin.Context) {
c.JSON(http.StatusUnauthorized, gin.H{"error": "username or password is incorrect."}) c.JSON(http.StatusUnauthorized, gin.H{"error": "username or password is incorrect."})
return return
} else { } else {
log.Printf("Login verified, returning token '%s'\n", token) //log.Printf("Login verified, returning token '%s'\n", token)
log.Printf("Login verified, returning token\n")
} }
c.JSON(http.StatusOK, gin.H{"access_token": token}) c.JSON(http.StatusOK, gin.H{"access_token": token})

View File

@@ -107,7 +107,7 @@ func VerifyPassword(password, hashedPassword string) error {
return errors.New("unable to compare password with empty hash") return errors.New("unable to compare password with empty hash")
} }
log.Printf("VerifyPassword comparing input against hashed value '%s'\n", hashedPassword) //log.Printf("VerifyPassword comparing input against hashed value '%s'\n", hashedPassword)
return bcrypt.CompareHashAndPassword([]byte(hashedPassword), []byte(password)) return bcrypt.CompareHashAndPassword([]byte(hashedPassword), []byte(password))
} }
@@ -154,10 +154,11 @@ func LoginCheck(username string, password string) (string, error) {
return "", errors.New(errString) return "", errors.New(errString)
} }
} else { } else {
log.Printf("LoginCheck retrieved user '%v' from database\n", u) //log.Printf("LoginCheck retrieved user '%v' from database\n", u)
log.Printf("LoginCheck retrieved user id '%d' from database\n", u.UserId)
} }
log.Printf("u: %v\n", u) //log.Printf("u: %v\n", u)
if !u.LdapUser { if !u.LdapUser {
// Locally defined user, perform password verification // Locally defined user, perform password verification