From 843dfd8d9056a271a4f226aee3798ede48fea2f4 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Sat, 9 Apr 2022 12:05:18 -0400 Subject: [PATCH 1/2] Update IndividualDomain.js Add case insensitivity to regex --- src/views/tenant/standards/IndividualDomain.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/tenant/standards/IndividualDomain.js b/src/views/tenant/standards/IndividualDomain.js index e459ece4a033..f3486ce989ea 100644 --- a/src/views/tenant/standards/IndividualDomain.js +++ b/src/views/tenant/standards/IndividualDomain.js @@ -93,7 +93,7 @@ export function IndividualDomainCheck({ const [masonrySize, setMasonrySize] = useState() const isValidDomain = (value) => - /^(((?!-))(xn--|_{1,1})?[a-z0-9-]{0,61}[a-z0-9]{1,1}\.)*(xn--)?([a-z0-9][a-z0-9-]{0,60}|[a-z0-9-]{1,30}\.[a-z]{2,})$/.test( + /^(((?!-))(xn--|_{1,1})?[a-z0-9-]{0,61}[a-z0-9]{1,1}\.)*(xn--)?([a-z0-9][a-z0-9-]{0,60}|[a-z0-9-]{1,30}\.[a-z]{2,})$/i.test( value, ) ? undefined From 6c48d9c956f692a9308524caf99d70e290a157b6 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Sun, 17 Apr 2022 20:49:31 -0400 Subject: [PATCH 2/2] ENHANCEMENT: SWA timeout handling on API calls - baseQuery.js Add 302 Found handler to axios error Redirect to /.auth/login/aad with post_login_redirect --- src/store/api/baseQuery.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/store/api/baseQuery.js b/src/store/api/baseQuery.js index f86d0d441a55..f7fdb82017c9 100644 --- a/src/store/api/baseQuery.js +++ b/src/store/api/baseQuery.js @@ -11,6 +11,10 @@ export const axiosQuery = async ({ path, method = 'get', params, data, hideToast }) return { data: result?.data } } catch (error) { + // Catch API call on timed out SWA session and send to login page + if (error.response?.status === 302) { + window.location.href = '/.auth/login/aad?post_login_redirect_uri=' + window.location.href + } return { error: { status: error.response?.status,