Skip to content

WEB API 6.0 - Return 500 instead of 401 when post large data with anonymous #47483

@bitsystem79

Description

@bitsystem79

Step to reproduce:

Create a Web API with a JWT Authentication and Create a simple controller in order to post a file (10 MB about) with Authorize attribute.

Deploy your APP on Azure (or IIS, it should be the same).

Test your API without authenticating through Chrome by simulating bad internet connection (press F12 on Chrome, go to Network tab and choose “Fast 3G”.

You’ll see a 500 server error, not 401, and backend side you’ll see something like “the application completed without reading the entire request body” which means that NET Core is waiting for full request body before understand that the call needs to be rejected because no JWT Token has been passed.

So it's dangerous for DoS attack also.

Metadata

Metadata

Assignees

Labels

Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsinvestigate

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions