From 782cd0ed1ea95ef90aa912482bb05d51f7054a81 Mon Sep 17 00:00:00 2001 From: Samira Mokaram Date: Fri, 13 Aug 2021 09:58:46 +0200 Subject: [PATCH] add scape Signed-off-by: Samira Mokaram --- plugins/auth-backend/src/service/router.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/auth-backend/src/service/router.test.ts b/plugins/auth-backend/src/service/router.test.ts index f0f5134848..ca8a14f4e6 100644 --- a/plugins/auth-backend/src/service/router.test.ts +++ b/plugins/auth-backend/src/service/router.test.ts @@ -28,19 +28,19 @@ describe('Auth origin filtering', () => { const config = defaultConfig(); config.getOptionalString = getOptionalString; it('Will explode, invalid origin', () => { - const origin = 'https://test.example.net'; + const origin = 'https://test\\.example.net'; expect(createOriginFilter(config)(origin)).toBeFalsy(); }); it('Will explode, invalid origin domain', () => { - const origin = 'https://test-1234.examplee.net'; + const origin = 'https://test-1234\\.examplee.net'; expect(createOriginFilter(config)(origin)).toBeFalsy(); }); it("Won't explode, valid origin with numbers", () => { - const origin = 'https://test-1234.example.net'; + const origin = 'https://test-1234\\.example.net'; expect(createOriginFilter(config)(origin)).toBeTruthy(); }); it("Won't explode, valid origin with chars and numbers", () => { - const origin = 'https://test-test1234.example.net'; + const origin = 'https://test-test1234\\.example.net'; expect(createOriginFilter(config)(origin)).toBeTruthy(); }); });