trim space in yubikey otp response
This commit is contained in:
parent
933d67e9af
commit
da5f974e68
1 changed files with 2 additions and 0 deletions
|
@ -7,6 +7,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/alexedwards/argon2id"
|
"github.com/alexedwards/argon2id"
|
||||||
|
@ -184,6 +185,7 @@ func Register(g *echo.Group) (err error) {
|
||||||
}
|
}
|
||||||
var verifiedOtpPubId string
|
var verifiedOtpPubId string
|
||||||
if form.OtpResponse != "" {
|
if form.OtpResponse != "" {
|
||||||
|
form.OtpResponse = strings.TrimSpace(form.OtpResponse)
|
||||||
if yubiAuth == nil {
|
if yubiAuth == nil {
|
||||||
return echo.NewHTTPError(http.StatusNotImplemented, "Yubikey authentication not configured")
|
return echo.NewHTTPError(http.StatusNotImplemented, "Yubikey authentication not configured")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue