mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
fix(application): do not crash on commit links for git:// repositories
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
862e021f2d
commit
0a144a5d7a
@@ -743,7 +743,7 @@ class Application extends BaseModel
|
||||
$git_repository = 'https://'.parse_url($git_repository, PHP_URL_HOST).parse_url($git_repository, PHP_URL_PATH);
|
||||
}
|
||||
|
||||
if (! filter_var($git_repository, FILTER_VALIDATE_URL)) {
|
||||
if (! filter_var($git_repository, FILTER_VALIDATE_URL) || ! in_array(parse_url($git_repository, PHP_URL_SCHEME), ['http', 'https'], true)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ it('does not generate commit links from incomplete repository URLs', function (s
|
||||
})->with([
|
||||
'missing host' => 'https://',
|
||||
'missing scheme' => 'github.com/coollabsio/coolify',
|
||||
'git protocol' => 'git://git.example.com/coollabsio/coolify.git',
|
||||
]);
|
||||
|
||||
it('converts scp-style remotes with generic usernames into https repository links', function (string $repository, string $expectedBranch, string $expectedCommits, string $expectedWebhook) {
|
||||
|
||||
Reference in New Issue
Block a user