-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
CsrfWebFilter null save content-type check #11204
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
ZhivkoDelchev
added
status: waiting-for-triage
An issue we've not yet triaged
type: bug
A general bug
labels
May 12, 2022
rwinch
added
status: waiting-for-feedback
We need additional information before we can continue
and removed
status: waiting-for-triage
An issue we've not yet triaged
labels
May 17, 2022
Thanks for the report and the PR! Closing in favor of gh-11205 |
rwinch
added
status: duplicate
A duplicate of another issue
and removed
status: waiting-for-feedback
We need additional information before we can continue
labels
Jun 2, 2022
rwinch
changed the title
NPE on requests with no content-type header with MultipartFormData enabled
CsrfWebFilter null save content-type check
Jun 2, 2022
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
github-actions
bot
added
the
status: backported
An issue that has been backported to maintenance branches
label
Jun 6, 2022
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: