From fedb093ca789b691d0d7ddec56174ed438bf67a2 Mon Sep 17 00:00:00 2001 From: vibhanshub <140522517+vibhanshub@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:09:12 +0000 Subject: [PATCH] Increase the min length of state param to 10 in OIDC integration (#661) Increase the min length of state param to 10 --- .changeset/silver-clouds-bow.md | 5 +++++ integrations/oidc/src/index.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/silver-clouds-bow.md diff --git a/.changeset/silver-clouds-bow.md b/.changeset/silver-clouds-bow.md new file mode 100644 index 000000000..a1a158841 --- /dev/null +++ b/.changeset/silver-clouds-bow.md @@ -0,0 +1,5 @@ +--- +'@gitbook/integration-oidc': patch +--- + +Increase the min length of state to 10 chars diff --git a/integrations/oidc/src/index.tsx b/integrations/oidc/src/index.tsx index 212633e54..806edc703 100644 --- a/integrations/oidc/src/index.tsx +++ b/integrations/oidc/src/index.tsx @@ -401,7 +401,7 @@ export default createIntegration({ url.searchParams.append('response_type', 'code'); url.searchParams.append('redirect_uri', `${installationURL}/visitor-auth/response`); url.searchParams.append('scope', scope.toLowerCase()); - url.searchParams.append('state', `state-${location}`); + url.searchParams.append('state', `oidcstate-${location}`); return Response.redirect(url.toString()); },