-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"InvalidOperationException: End of body before form was fully parsed" on Linux on OpenIdConnect POST callback #13372
Comments
Your second and third log are cut off before the /sigin-oidc request finishes. Is there more to those log? Can you capture a client side wireshark trace for the successes and failures? How about a Fiddler trace? Side question: Why do you have two SessionMiddleware in the pipeline? |
FYI there was a fix to the parser in preview9: |
The remainder of the request isn't really relevant to the scope of the issue since the request cuts out before processing the request. This is why I cut off the log after the first sign of processing. The two working ones both end in:
Regarding Fiddler/Wireshark, I have included the (redacted) working and not working requests. I omitted them because I didn't see any differences but maybe I'm missing something. Also the initial requests are both responded to with a 302 to https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize? etc. both with the Set-Cookies for OpenIdConnect and Correlation. These requests result in the following POST requests. Broken Linux
Working Windows
Regarding the fix; I used the latest build (downloaded today) from this link https://github.com/dotnet/core-sdk/blob/master/README.md#installers-and-binaries so I figure I must have it included since the merge was done quite a long time ago. Why I have two SessionMiddleware's I actually don't know. As far as I can there are only two mentions of it in the Startup. Once in the app configuration and once in the service configuration. And I also add a Redis cache. |
@LaurensAdema can you give lengths for the redacted values in I see an issue in the form parser that's sensitive to relative length of values. |
Code is 2478 chars, state is 306 chars and session state is 36 chars |
@LaurensAdema thanks, that matches my repro case. I've submitted a PR to fix this. You should be fine if you roll back to preview8, this was only regressed in preview9. |
Okay thanks! |
While updating to nightly builds I found that the POST callback on OpenIdConnect (to Azure) does not work on Linux, while it does on Windows. I can confirm it worked on preview 7 on Linux. I don't have confirmation on preview 8 but it is definitely broken on 3.0.0-preview9-19419-03. I have tried both Framework-Dependent as Self-Contained on linux-x64.
The exception:
Broken 3.0.0-preview9-19419-03 Linux Webserver log (on Linux Azure App Service)
Working 3.0.0-preview7 Linux Webserver log (on Linux Azure App Service)
Working 3.0.0-preview9-19419-03 Windows Webserver log (on Windows localhost, Windows App Service logs are more difficult to obtain)
The text was updated successfully, but these errors were encountered: