Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions server/auth/handlers/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,13 @@ func (h *AuthHandlers) handle(fn handlerFn) http.HandlerFunc {
return
}

if !validFormPost(r) {
req.Status = http.StatusRequestEntityTooLarge
return
// Only validate form post for actual POST/PUT/PATCH requests, not GET
// GET requests with query params (like OIDC callbacks) can have long values
if r.Method == http.MethodPost || r.Method == http.MethodPut || r.Method == http.MethodPatch {
if !validFormPost(r) {
req.Status = http.StatusRequestEntityTooLarge
return
}
}

req.Client = request.GetOauth2Client(req.Session)
Expand Down