From 597317170398fef78aa5b3420c0a8752b98e2542 Mon Sep 17 00:00:00 2001 From: Viachaslau Tyshkavets Date: Wed, 28 Aug 2024 09:33:20 +0400 Subject: [PATCH] fix: prettier --- src/auth/auth.guard.ts | 5 ++++- src/auth/jwt/jwt.token.bearer.processor.ts | 5 ++++- src/utils/url.ts | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/auth/auth.guard.ts b/src/auth/auth.guard.ts index 1a4e707b..d6eb3d48 100644 --- a/src/auth/auth.guard.ts +++ b/src/auth/auth.guard.ts @@ -74,7 +74,10 @@ export class AuthGuard implements CanActivate { try { return !!(await this.authService.validateToken(token, processorType)); } catch { - return !!(await this.authService.validateToken(token, JwtProcessorType.BEARER)); + return !!(await this.authService.validateToken( + token, + JwtProcessorType.BEARER, + )); } } diff --git a/src/auth/jwt/jwt.token.bearer.processor.ts b/src/auth/jwt/jwt.token.bearer.processor.ts index f23331b2..f2524296 100644 --- a/src/auth/jwt/jwt.token.bearer.processor.ts +++ b/src/auth/jwt/jwt.token.bearer.processor.ts @@ -56,7 +56,10 @@ export class JwtBearerTokenProcessor extends JwtTokenProcessor { } } - private async decodeAndVerifyToken(token: string, kid: string): Promise { + private async decodeAndVerifyToken( + token: string, + kid: string, + ): Promise { try { return await this.keyCloakService.verifyToken(token, kid); } catch (e) { diff --git a/src/utils/url.ts b/src/utils/url.ts index 6b502e8d..7b0eea4f 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -1,6 +1,9 @@ // Taken from PortSwigger's prototype pollution labs // VULNERABLE TO PROTOTYPE POLLUTION! -const splitUriIntoParamsPPVulnerable = (params, coerce = undefined): Record => { +const splitUriIntoParamsPPVulnerable = ( + params, + coerce = undefined, +): Record => { if (params.charAt(0) === '?') { params = params.substring(1); }