base 64 decode password

This commit is contained in:
GotPPay
2018-06-01 19:31:40 +02:00
parent 3494273503
commit 840823cda8

View File

@@ -2,6 +2,7 @@ package passwordresetroute
import (
"crypto/sha256"
b64 "encoding/base64"
"fmt"
"math/rand"
"strings"
@@ -120,7 +121,7 @@ func (c *controller) handleResetComplete(ctx echo.Context) error {
pass, err := b64.StdEncoding.DecodeString(user.Pass)
if err != nil {
return routeutils.ResponseAPIPasswordResetFailed(ctx, "Invalid password", false)
return routeutils.ResponseAPIPasswordResetFailed(ctx, "Invalid password")
}
user.Pass = string(pass)