fix: Restrict form size validation to non-GET requests#2276
Open
manuelnelson wants to merge 5 commits into
Open
fix: Restrict form size validation to non-GET requests#2276manuelnelson wants to merge 5 commits into
manuelnelson wants to merge 5 commits into
Conversation
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.
Author
|
@tjerman Is there something I need to do to help get this pushed through? |
Member
|
@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 |
b8536d1 to
b7d6d27
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.