feat(webhooks): require 16 characters for new manual webhook secrets

New or changed manual webhook secrets (GitHub, GitLab, Bitbucket,
Gitea) must have at least 16 characters, in the Webhooks page and in
the application API. Stored secrets keep working: an unchanged value
passes, and an empty value still disables the webhook. Each secret
field gets a Generate button that fills a random 40-character secret;
the user saves it after adding it to the Git provider.
This commit is contained in:
Andras Bacsai
2026-10-01 20:31:00 +02:00
parent c85c697e80
commit 0ed423aaac
6 changed files with 373 additions and 10 deletions
@@ -3245,7 +3245,7 @@ class ApplicationsController extends Controller
'include_source_commit_in_build' => 'boolean',
'ports_exposes' => 'nullable|string|regex:/^(\d+)(,\d+)*$/',
];
$validationRules = array_merge(sharedDataApplications(), $validationRules);
$validationRules = array_merge(sharedDataApplications($application), $validationRules);
$validationMessages = [
'docker_compose_domains.*.array' => 'An item in the docker_compose_domains array has invalid fields. Only name, domain, and redirect fields are supported.',
];