-
Notifications
You must be signed in to change notification settings - Fork 6k
CsrfWebFilter null save content-type check #11204
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
Labels
status: backported
An issue that has been backported to maintenance branches
status: duplicate
A duplicate of another issue
type: bug
A general bug
Comments
Thanks for the report and the PR! Closing in favor of gh-11205 |
ZhivkoDelchev
added a commit
to ZhivkoDelchev/spring-security
that referenced
this issue
Jun 5, 2022
When MultipartFormData is enabled currently the CsrfWebFilter compares the content-type header against MULTIPART_FORM_DATA MediaType which leads to NullPointerExecption when there is no content-type header. This commit reverse the check to compare the MULTIPART_FORM_DATA MediaType against the content-type which contains null check and avoids the exception. closes spring-projectsgh-11204
rwinch
pushed a commit
that referenced
this issue
Jun 6, 2022
When MultipartFormData is enabled currently the CsrfWebFilter compares the content-type header against MULTIPART_FORM_DATA MediaType which leads to NullPointerExecption when there is no content-type header. This commit reverse the check to compare the MULTIPART_FORM_DATA MediaType against the content-type which contains null check and avoids the exception. closes gh-11204
rwinch
pushed a commit
that referenced
this issue
Jun 6, 2022
When MultipartFormData is enabled currently the CsrfWebFilter compares the content-type header against MULTIPART_FORM_DATA MediaType which leads to NullPointerExecption when there is no content-type header. This commit reverse the check to compare the MULTIPART_FORM_DATA MediaType against the content-type which contains null check and avoids the exception. closes gh-11204 Closes gh-11205
rwinch
pushed a commit
that referenced
this issue
Jun 6, 2022
When MultipartFormData is enabled currently the CsrfWebFilter compares the content-type header against MULTIPART_FORM_DATA MediaType which leads to NullPointerExecption when there is no content-type header. This commit reverse the check to compare the MULTIPART_FORM_DATA MediaType against the content-type which contains null check and avoids the exception. closes gh-11204 Closes gh-11205
rwinch
pushed a commit
that referenced
this issue
Jun 6, 2022
When MultipartFormData is enabled currently the CsrfWebFilter compares the content-type header against MULTIPART_FORM_DATA MediaType which leads to NullPointerExecption when there is no content-type header. This commit reverse the check to compare the MULTIPART_FORM_DATA MediaType against the content-type which contains null check and avoids the exception. closes gh-11204 Closes gh-11205
This was referenced Jun 6, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
status: backported
An issue that has been backported to maintenance branches
status: duplicate
A duplicate of another issue
type: bug
A general bug
Bug description
Performing non-GET requests with no content-type header results in a NullPointerException from CsrfWebFilter when MultipartFormData is enabled.
To Reproduce
Perform non-GET request with no body &
content-type
header with MultipartFormData enabled.Expected behavior
All methods without body &
content-type
header should work.Stacktrace
The text was updated successfully, but these errors were encountered: