From 4e42452ec861cc33d8cd686062bf96d1922a4031 Mon Sep 17 00:00:00 2001 From: tdurieux Date: Tue, 7 Sep 2021 07:30:34 +0200 Subject: [PATCH] feat: support uppercase in commit sha --- src/routes/repository-private.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/repository-private.ts b/src/routes/repository-private.ts index d174066..b4b0f35 100644 --- a/src/routes/repository-private.ts +++ b/src/routes/repository-private.ts @@ -197,7 +197,7 @@ function validateNewRepo(repoUpdate) { if (!Array.isArray(repoUpdate.terms)) { throw new AnonymousError("invalid_terms_format", repoUpdate.terms); } - if (!/^[a-f0-9]+$/.test(repoUpdate.source.commit)) { + if (!/^[a-fA-F0-9]+$/.test(repoUpdate.source.commit)) { throw new AnonymousError("invalid_commit_format", repoUpdate.source.commit); } }