From a3882cbf0216f76ef3b3732b46045aab1e0216d3 Mon Sep 17 00:00:00 2001 From: Jordan Date: Tue, 18 Mar 2014 14:35:02 -0500 Subject: [PATCH] A couple more auth.go cleanups --- auth/auth.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/auth/auth.go b/auth/auth.go index 89ffbacc..1fba1f78 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -41,10 +41,8 @@ func Login(r *http.Request) (bool, error) { //Let's check the password err = bcrypt.CompareHashAndPassword([]byte(u.Hash), []byte(password)) if err != nil { - fmt.Println("Error in comparing hash and password") ctx.Set(r, "user", nil) - //Return false, but don't return an error - return false, nil + return false, ErrInvalidPassword } ctx.Set(r, "user", u) session.Values["id"] = u.Id