-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Open
Labels
in: docsAn issue in Documentation or samplesAn issue in Documentation or samplesstatus: ideal-for-contributionAn issue that we actively are looking for someone to help us withAn issue that we actively are looking for someone to help us withtype: enhancementA general enhancementA general enhancement
Description
Summary
The current docs say that there are two options to handle CSRF protection with multipart/form-data - not having security on multi-part file transfer or sending the CSRF token with the URL. The second is a security breach, as the docs mention.
Expected Behavior
A third option should be added: adding the CSRF token to the XHR POST request header sent to the server. This option works, I have tested it with Spring-Boot 1.5.2.RELEASE. I detailed the steps on SO.
Basically, it follows the guideline of sending the CSRF token via an AJAX request (and submitting the multi-part form using an AJAX request).
Version
Spring Security 4.2.2 - 18.5.4 Multipart (file upload)
darioseidl
Metadata
Metadata
Assignees
Labels
in: docsAn issue in Documentation or samplesAn issue in Documentation or samplesstatus: ideal-for-contributionAn issue that we actively are looking for someone to help us withAn issue that we actively are looking for someone to help us withtype: enhancementA general enhancementA general enhancement