Skip to content
Snippets Groups Projects
Commit 5bd84602 authored by Gabriel Zachmann's avatar Gabriel Zachmann
Browse files

fix pkce code verifier length

parent d8003ea9
Branches
Tags
No related merge requests found
......@@ -133,15 +133,17 @@ func HandleConsentPost(ctx *fiber.Ctx) error {
}.Send(ctx)
}
}
pkceCode := pkce.NewS256PKCE(utils.RandASCIIString(32))
if err = db.Transact(func(tx *sqlx.Tx) error {
pkceCode := pkce.NewS256PKCE(utils.RandASCIIString(44))
if err = db.Transact(
func(tx *sqlx.Tx) error {
if err = authcodeinforepo.UpdateTokenInfoByState(
tx, oState, req.Restrictions, req.Capabilities, req.SubtokenCapabilities, req.Rotation, req.TokenName,
); err != nil {
return err
}
return authcodeinforepo.SetCodeVerifier(tx, oState, pkceCode.Verifier())
}); err != nil {
},
); err != nil {
log.Errorf("%s", errorfmt.Full(err))
return model.ErrorToInternalServerErrorResponse(err).Send(ctx)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment