mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-01 03:55:22 +02:00
feat(validation): add branch name validation across provider schemas
- Introduced a regex validation for branch names in Bitbucket, Git, Gitea, GitHub, and GitLab provider schemas to ensure valid branch formats. - Updated the corresponding schemas to include the new validation rule, enhancing input integrity and preventing potential errors. - Added a utility for branch validation in the server utils.
This commit is contained in:
3
packages/server/src/utils/git-branch-validation.ts
Normal file
3
packages/server/src/utils/git-branch-validation.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// Valid git branch names per git-check-ref-format rules.
|
||||
// Rejects shell metacharacters that would enable command injection.
|
||||
export const VALID_BRANCH_REGEX = /^[a-zA-Z0-9._\-/]+$/;
|
||||
Reference in New Issue
Block a user