Skip to content

Commit c4cedda

Browse files
fix(platform-fastify): middie bypassing through decoded chars
1 parent ad88fa8 commit c4cedda

File tree

6 files changed

+419
-765
lines changed

6 files changed

+419
-765
lines changed

‎integration/hello-world/e2e/middleware-fastify.spec.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,15 @@ describe('Middleware (FastifyAdapter)', () => {
208208
.then(({ payload }) => expect(payload).to.be.eql(INCLUDED_VALUE));
209209
});
210210

211+
it(`GET forRoutes(POST /tests/%69ncluded) - ensure middleware is executed correctly with encoded characters`, () => {
212+
return app
213+
.inject({
214+
method: 'POST',
215+
url: '/tests/%69ncluded', // 'i' character is encoded
216+
})
217+
.then(({ payload }) => expect(payload).to.be.eql(INCLUDED_VALUE));
218+
});
219+
211220
afterEach(async () => {
212221
await app.close();
213222
});

0 commit comments

Comments
 (0)