From 01e71e2a478be393dabf14e69520b0f8892baf59 Mon Sep 17 00:00:00 2001 From: Nanguan Lin <70063547+lng2020@users.noreply.github.com> Date: Wed, 6 Sep 2023 04:15:19 +0800 Subject: [PATCH] Fix the secret regexp pattern on web page (#26910) The error is caused by the web page not handling the post form failure, which is 400 bad requests in this case. --- templates/shared/secrets/add_list.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/shared/secrets/add_list.tmpl b/templates/shared/secrets/add_list.tmpl index a80ec314d2..6215eff369 100644 --- a/templates/shared/secrets/add_list.tmpl +++ b/templates/shared/secrets/add_list.tmpl @@ -63,7 +63,7 @@ id="secret-name" name="name" value="{{.name}}" - pattern="^[a-zA-Z_][a-zA-Z0-9_]*$" + pattern="^(?!GITEA_|GITHUB_)[a-zA-Z_][a-zA-Z0-9_]*$" placeholder="{{.locale.Tr "secrets.creation.name_placeholder"}}" >