From 9db338b7528da7555defa7ac0181773c69b786a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20de=20Pedro=20L=C3=B3pez?= Date: Fri, 12 Mar 2021 16:13:19 +0100 Subject: [PATCH] Update ghec-audit-log-utils.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stefan Stölzle --- ghec-audit-log-utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghec-audit-log-utils.js b/ghec-audit-log-utils.js index 4bc9832..d1f3bfe 100644 --- a/ghec-audit-log-utils.js +++ b/ghec-audit-log-utils.js @@ -15,7 +15,7 @@ function validateInput (program, config) { } // Validate correctness - const tokenRegex = /^[A-Za-z0-9_]+$/i + const tokenRegex = /^[g(p|o|u|s|r)1_]{0,1}[A-Za-z0-9_]+$/ const base64Regex = '(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)' const orgRegex = /^[a-z\d]+(?:-?[a-z\d]+)*$/i const constraints = {