From 7d86e35ef4186df0f44d69b77e40acd623287fa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Arag=C3=A3o?= Date: Sat, 23 Nov 2024 22:55:45 -0500 Subject: [PATCH] fix: shopify shop validation --- handshake/src/providers/shopify.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handshake/src/providers/shopify.ts b/handshake/src/providers/shopify.ts index 1dad7f7..7db4eb4 100644 --- a/handshake/src/providers/shopify.ts +++ b/handshake/src/providers/shopify.ts @@ -244,8 +244,8 @@ export const Shopify: HandlerFactory = ({ } // TODO validate shop value. - if (!extras.shop.match(/^[a-zA-Z][a-zA-Z_-]*\.myshopify.com$/)) { - throw Error("Invalid shop value."); + if (!extras.shop.match(/^[a-zA-Z][a-zA-Z_-0-9]*\.myshopify.com$/)) { + throw Error("Invalid extras.shop value."); } const authUrl = new URL(`https://${extras.shop}/admin/oauth/authorize`);