base 64 decode password
This commit is contained in:
@@ -2,6 +2,7 @@ package passwordresetroute
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
|
b64 "encoding/base64"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -120,7 +121,7 @@ func (c *controller) handleResetComplete(ctx echo.Context) error {
|
|||||||
|
|
||||||
pass, err := b64.StdEncoding.DecodeString(user.Pass)
|
pass, err := b64.StdEncoding.DecodeString(user.Pass)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return routeutils.ResponseAPIPasswordResetFailed(ctx, "Invalid password", false)
|
return routeutils.ResponseAPIPasswordResetFailed(ctx, "Invalid password")
|
||||||
}
|
}
|
||||||
user.Pass = string(pass)
|
user.Pass = string(pass)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user