Added test case for fastify.all

This commit is contained in:
Napalys Klicius
2025-04-30 14:50:35 +02:00
parent 8ebbfb198e
commit 6d61766366

View File

@@ -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 };
});