From 927ede8db29c0665abf172c6e9b4d7828b533554 Mon Sep 17 00:00:00 2001 From: gregcorbett Date: Thu, 9 Jun 2022 10:26:34 +0000 Subject: [PATCH] Fix JS regex use to validate IRIS IAM strings Co-authored-by: ineilson --- htdocs/web_portal/javascript/linking.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/web_portal/javascript/linking.js b/htdocs/web_portal/javascript/linking.js index 535634736..860b9c7a9 100644 --- a/htdocs/web_portal/javascript/linking.js +++ b/htdocs/web_portal/javascript/linking.js @@ -84,8 +84,8 @@ function getRegExIdString() { // End with @iris.iam.ac.uk } else if (authType === "IRIS IAM - OIDC") { - // var regExIdString = /^([a-f0-9]{8}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{12})@iris\-iam\.ac\.uk$/; - var regExIdString = /^.+@iris\-iam\.ac\.uk$/; + // var regExIdString = /^([a-f0-9]{8}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{12})@iris\-iam\.stfc\.ac\.uk$/; + var regExIdString = /^.+@iris\-iam\.stfc\.ac\.uk\/$/; // End with @egi.eu } else if (authType === "EGI Proxy IdP") { @@ -270,4 +270,4 @@ function formatEmail() { } else if (empty) { $('#emailError').text("Please enter the account's email"); } -} \ No newline at end of file +}