From c406f9762bcf1f2954c1168006a0fb4daee39a0f Mon Sep 17 00:00:00 2001 From: Juan Falcon Date: Tue, 18 Jun 2024 13:30:04 -0300 Subject: [PATCH] fix vulnerable inputs and branch names --- dist/index.js | 2 +- index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 0e86efa..cf048f7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -12873,7 +12873,7 @@ const { owner, repo } = Github.context.repo; async function run() { try { // Validate envs and inputs - if (/^([\w-]+)$/.test(versionPrefix) === false) { + if (versionPrefix !== "" && /^([\w-]+)$/.test(versionPrefix) === false) { core.setFailed('Invalid version prefix.'); return; } diff --git a/index.ts b/index.ts index 1d28d0e..4294f04 100755 --- a/index.ts +++ b/index.ts @@ -40,7 +40,7 @@ const {owner, repo} = Github.context.repo async function run() { try { // Validate envs and inputs - if(/^([\w-]+)$/.test(versionPrefix) === false) { + if(versionPrefix !== "" && /^([\w-]+)$/.test(versionPrefix) === false) { core.setFailed('Invalid version prefix.'); return }