-
Notifications
You must be signed in to change notification settings - Fork 9
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
[java] Add java endpoint for RASP LFI #2947
Conversation
@@ -41,6 +43,16 @@ public ResponseEntity<String> sqli(@RequestBody final UserDTO body) throws SQLEx | |||
return execSql(body.getUserId()); | |||
} | |||
|
|||
@RequestMapping(value = "/lfi", method = {GET, POST}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟠 Code Vulnerability
Methods annotated with RequestMapping are by default mapped to all the HTTP request methods (...read more)
Classes that contain methods annotated with RequestMapping
are by default mapped to all the HTTP request methods.
Spring Security's CSRF protection is not enabled by default for the HTTP request methods GET
, HEAD
, TRACE
, and OPTIONS
.
For this reason, requests or routes with RequestMapping
, and not narrowing the mapping to the HTTP request methods POST
, PUT
, DELETE
, or PATCH
, makes them vulnerable to CSRF attacks.
Learn More
15d46b8
to
5dc97c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small request change, then all good
65c9d76
to
2e1735c
Compare
Motivation
Changes
Workflow
codeowners
file quickly.🚀 Once your PR is reviewed, you can merge it!
🛟 #apm-shared-testing 🛟
Reviewer checklist
[<language>]
, double-check that only<language>
is impacted by the changebuild-XXX-image
label is present