feat: support uppercase in commit sha

This commit is contained in:
tdurieux
2021-09-07 07:30:34 +02:00
parent 4c30e3c4d4
commit 4e42452ec8

View File

@@ -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);
}
}