feat(validation): enhance ValidGitRepositoryUrl to support additional safe characters and add comprehensive unit tests for various Git repository URL formats

This commit is contained in:
Andras Bacsai committed 2025-09-28 22:18:21 +02:00
1 parent e5f13fb363
commit 810ba3dd9e
2 files changed
+357 -1

No files matched your search

+1 -1
View File
@@ -136,7 +136,7 @@ class ValidGitRepositoryUrl implements ValidationRule
// Validate path contains only safe characters
$path = $parsed['path'] ?? '';
if (! empty($path) && ! preg_match('/^[a-zA-Z0-9\-_\/\.]+$/', $path)) {
if (! empty($path) && ! preg_match('/^[a-zA-Z0-9\-_\/\.@~]+$/', $path)) {
$fail('The :attribute path contains invalid characters.');
return;