Skip to content
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

Process additional data contained in resolved methods #17

Open
cerrussell opened this issue Jan 30, 2024 · 1 comment
Open

Process additional data contained in resolved methods #17

cerrussell opened this issue Jan 30, 2024 · 1 comment
Assignees
Labels
enhancement Enhance an existing feature

Comments

@cerrussell
Copy link
Member

cerrussell commented Jan 30, 2024

We can sometimes get media types, responses, headers, body, etc. within resolved methods.

Examples

Java

"@RequestMapping(value = \"/vuln/emptyReferer\", produces = \"application/javascript\")"

"@RequestMapping(method = RequestMethod.POST, value = \"/uaa/users\", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)"

Javascript/Typescript

"app.use(functionjsonParser(req:Request,res:Response,next:NextFunction){\r//@ts-expect-errorFIXMEintentionallysavingoriginalrequestinthisproperty\rreq.rawBody=req.body\rif(req.headers['content-type']?.includes('application/json')){\rif(!req.body){\rreq.body={}\r}\rif(req.body!==Object(req.body)){//Expensiveworkaroundfor500errorsduringFrisbytestrun(see#640)\rreq.body=JSON.parse(req.body)\r}\r}\rnext()\r})",

@cerrussell cerrussell changed the title Process media types contained in resolved methods Process additional data contained in resolved methods Jan 30, 2024
@cerrussell cerrussell added the enhancement Enhance an existing feature label Feb 1, 2024
@cerrussell cerrussell self-assigned this Feb 1, 2024
@prabhu
Copy link
Collaborator

prabhu commented Feb 27, 2024

@cerrussell, the javascript example looks like a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhance an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants