Skip to content

Support magic-bytes/file extension validation for multipart requests #35647

@zakaria-shahen

Description

@zakaria-shahen

It would be great if Spring support magic-bytes validation for FilePart or Part, so I could specify allowed file extensions per endpoint (perhaps depending on Apache Tika to handle this).

Also, I see spring.servlet.multipart.max-file-size and spring.webflux.multipart.max-disk-usage-per-part exists, but unfortunately it's not customizable per endpoint. It would be great if Spring could support that in some way.

Lastly, it would be great if by default Spring disallowed all file extensions when Spring Security exists in the classpath for better secure default configuration.

Thanks :)

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