Skip to content

fix: Restrict form size validation to non-GET requests#2276

Open
manuelnelson wants to merge 5 commits into
cortezaproject:2024.9.xfrom
manuelnelson:2024.9.x-fix-oauth-handler
Open

fix: Restrict form size validation to non-GET requests#2276
manuelnelson wants to merge 5 commits into
cortezaproject:2024.9.xfrom
manuelnelson:2024.9.x-fix-oauth-handler

Conversation

@manuelnelson
Copy link
Copy Markdown

@manuelnelson manuelnelson commented Jan 15, 2026

Our Azure OAuth recently broke. It turns out, the token being returned was larger than 1024 characters, and the validFormPost was failing and not allowing users to login. With 200+ users, this was a pretty big issue for us, since this is our primary/secure way of logging in.

The following changes are implemented

Form size validation is now only applied to POST, PUT, and PATCH requests. This allows GET requests with long query parameters, such as OIDC callbacks, to bypass the form size check.

Changes in the user interface:

None

Checklist when submitting a final (!draft) PR

  • Commits are tidied up, squashed if needed and follow guidelines in CONTRIBUTING.md
  • Code builds
  • All existing tests pass
  • All new critical code is covered by tests
  • PR is linked to the relevant issue(s)
  • Rebased with the target branch

There previously wasn't an issue for this so I didn't link to it. Also, since it's a one-liner, I didn't add any new tests for this. I'm not really a Go developer, so let me know if this is all good. Also open to other ways of fixing this issue, but this is what I thought was the most innocuous.

Form size validation is now only applied to POST, PUT, and PATCH requests. This allows GET requests with long query parameters, such as OIDC callbacks, to bypass the form size check.
@manuelnelson
Copy link
Copy Markdown
Author

@tjerman Is there something I need to do to help get this pushed through?

@tjerman
Copy link
Copy Markdown
Member

tjerman commented May 18, 2026

@manuelnelson can you write down the exact reason/flow what caused it to fail? Looking at your changes, this shouldn't alter the existing flow

@Fajfa Fajfa force-pushed the 2024.9.x branch 2 times, most recently from b8536d1 to b7d6d27 Compare May 21, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants