From 80ed98b73b780731e9051fbc2203a212979780ea Mon Sep 17 00:00:00 2001 From: Mama Naomi Date: Thu, 18 Jan 2024 16:34:10 -0800 Subject: [PATCH] fix(client): invert action validation logic (#53213) --- client/src/templates/Challenges/utils/frame.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/templates/Challenges/utils/frame.ts b/client/src/templates/Challenges/utils/frame.ts index 8c033266fc0..7fca7864602 100644 --- a/client/src/templates/Challenges/utils/frame.ts +++ b/client/src/templates/Challenges/utils/frame.ts @@ -120,7 +120,7 @@ const createHeader = (id = mainPreviewId) => ` document.addEventListener('submit', function(e) { const action = e.target.getAttribute('action'); e.preventDefault(); - if (action || action.match(/https?:\\/\\//)) { + if (action && action.match(/https?:\\/\\//)) { window.parent.window.alert( i18nContent.t('misc.iframe-form-submit-alert', { externalLink: action }) )