File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
packages/endpoint-auth/lib Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export const authorizationController = {
3838 }
3939
4040 // `response_type` must be `code` (or deprecated `id`)
41- if ( ! / ^ ( c o d e | i d ) $ / . test ( request . query . response_type ) ) {
41+ if ( ! / ^ ( c o d e | i d ) $ / . test ( String ( request . query . response_type ) ) ) {
4242 throw IndiekitError . badRequest (
4343 response . locals . __ ( "BadRequestError.invalidValue" , "response_type" )
4444 ) ;
@@ -54,7 +54,7 @@ export const authorizationController = {
5454
5555 // Canonicalise URLs for later comparison
5656 if ( request . query [ uri ] ) {
57- request . query [ uri ] = getCanonicalUrl ( request . query [ uri ] ) ;
57+ request . query [ uri ] = getCanonicalUrl ( String ( request . query [ uri ] ) ) ;
5858 }
5959 }
6060
@@ -70,7 +70,7 @@ export const authorizationController = {
7070 }
7171
7272 // Add client information to locals
73- request . app . locals . client = await getClientInformation ( client_id ) ;
73+ request . app . locals . client = await getClientInformation ( String ( client_id ) ) ;
7474
7575 // Use PKCE if code challenge parameters provided
7676 request . app . locals . usePkce = code_challenge && code_challenge_method ;
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export const createRequestUri = (request) => {
2828 */
2929export const getRequestUriData = ( request ) => {
3030 const { request_uri } = request . query ;
31- const reference = request_uri . split ( ":" ) [ 5 ] ;
31+ const reference = String ( request_uri ) . split ( ":" ) [ 5 ] ;
3232
3333 return request . app . locals [ reference ] ;
3434} ;
You can’t perform that action at this time.
0 commit comments