mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Added test case for fastify.all
This commit is contained in:
@@ -101,3 +101,10 @@ fastify.get('/flow-through-reply', async (request, reply) => {
|
||||
}
|
||||
return { result: null };
|
||||
});
|
||||
|
||||
fastify.all('/eval', async (request, reply) => {
|
||||
const userInput = request.query.code; // $ MISSING: Source[js/code-injection]
|
||||
const result = eval(userInput); // $ MISSING: Alert[js/code-injection]
|
||||
const replyResult = eval(reply.locals.nestedCode); // $ MISSING: Alert[js/code-injection]
|
||||
return { method: request.method, result };
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user