Skip to content

Unexpected overriding the default MaxRequestBodySize value for Kestrel #20353

@wtct

Description

@wtct

Which Umbraco version are you using?

13.9.2

Bug summary

We have noticed that in the ConfigureKestrelServerOptions class the MaxRequestBodySize is being overridden from 28.6 MB to 50 MB once the Umbraco:CMS:Runtime:MaxRequestLength is not set in the appsettings.json file.

Therefore, it can cause unexpected behavior especially the documentation is referring 28.6 MB here:

https://docs.umbraco.com/umbraco-cms/reference/configuration/maximumuploadsizesettings#using-kestrel

I was trying to point this out in the #20343, but a separate issue were suggested by @AndyButland.

You can find more details in our article under the Documentation inconsistency heading.

In my opinion it would be better to not touch at all the MaxRequestBodySize option if the Umbraco:CMS:Runtime:MaxRequestLength is not set.

I hope it makes sense.

cc: @piotrbach

Specifics

No response

Steps to reproduce

  1. Make sure that the Umbraco:CMS:Runtime:MaxRequestLength is not set in the appsettings.json.
  2. Try to upload larger file than 28.6 MB e.g. 30 MB once Umbraco is hosted on Kestrel.
  3. Ensure that file is being uploaded without any issue.

Expected result / actual result

Expected result:

You should not be able to upload a file larger that 28.6MB in Umbraco hosted on Kestrel if the Umbraco:CMS:Runtime:MaxRequestLength is not set in the appsettings.json as described in documentation:

https://docs.umbraco.com/umbraco-cms/reference/configuration/maximumuploadsizesettings#using-kestrel

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions