diff --git a/src/layouts/entry-page/entry-page.vue b/src/layouts/entry-page/entry-page.vue index 4c5f84c2..bdbe78ae 100644 --- a/src/layouts/entry-page/entry-page.vue +++ b/src/layouts/entry-page/entry-page.vue @@ -136,12 +136,16 @@ export default { if (resp.authentication.startsWith('RSAToken')) { const { token, signature } = queryStringParams; const vsigResp = await validateISSClientSignature(clientTag, token, signature); - + + // Encrypted params only populated if the authentication type includes EncParams and we have a pattern to pull them out of the decrypted data. + // Try/Catch is here to ensure that any issues with populating these parameters does not impact the overall authentication/authorization of the client. + // They can fallback to manually entering the data on the webpage. if (resp.authentication.includes('EncParams') && encryptedParametersPattern) { try { - const match = vsigResp.decryptedData.match(encryptedParametersPattern); + const encryptedParametersPatternRegex = RegExp(encryptedParametersPattern); + const match = vsigResp.decryptedData.match(encryptedParametersPatternRegex); - if ( match ) { + if ( match?.groups ) { const params = match.groups; for (const [key, value] of Object.entries(params)) { decryptedParams[key.toLowerCase()] = value; @@ -299,9 +303,8 @@ export default { return null; } } - } } -}; + };