Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
server
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
m-team
oidc
mytoken
server
Commits
5bd84602
Commit
5bd84602
authored
Oct 14, 2021
by
Gabriel Zachmann
Browse files
Options
Downloads
Patches
Plain Diff
fix pkce code verifier length
parent
d8003ea9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
internal/endpoints/consent/consent.go
+11
-9
11 additions, 9 deletions
internal/endpoints/consent/consent.go
with
11 additions
and
9 deletions
internal/endpoints/consent/consent.go
+
11
−
9
View file @
5bd84602
...
...
@@ -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
)
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment