mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
Fixes deployment failures when Git repositories redirect (e.g., tangled.sh → tangled.org) and improves security by adding proper shell escaping for repository URLs. **Root Cause:** Git redirect warnings can appear on the same line as ls-remote output with no newline: `warning: redirecting to https://tangled.org/...196d3df... refs/heads/master` The previous parsing logic split by newlines and extracted text before tabs, which included the entire warning message instead of just the 40-character commit SHA. **Changes:** 1. **Fixed commit SHA extraction** (ApplicationDeploymentJob.php): - Changed from line-based parsing to regex pattern matching - Uses `/([0-9a-f]{40})\s*\t/` to find valid 40-char hex commit SHA before tab - Handles warnings on same line, separate lines, multiple warnings, and whitespace - Added comprehensive Ray debug logs for troubleshooting 2. **Added security fix** (Application.php): - Added `escapeshellarg()` for repository URLs in 'other' deployment type - Prevents shell injection and fixes parsing issues with special characters like `@` - Added Ray debug logs for deployment type tracking 3. **Comprehensive test coverage** (GitLsRemoteParsingTest.php): - Tests normal output without warnings - Tests redirect warning on separate line - Tests redirect warning on same line (actual tangled.sh format) - Tests multiple warning lines - Tests extra whitespace handling **Resolves:** - Linear issue COOLGH-53: Valid git URLs are rejected as being invalid - GitHub issue #6568: tangled.sh deployments failing - Handles Git redirects universally for all Git hosting services 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| ApplicationDeploymentJob.php | ||
| ApplicationPullRequestUpdateJob.php | ||
| CheckAndStartSentinelJob.php | ||
| CheckForUpdatesJob.php | ||
| CheckHelperImageJob.php | ||
| CleanupHelperContainersJob.php | ||
| CleanupInstanceStuffsJob.php | ||
| CleanupStaleMultiplexedConnections.php | ||
| CoolifyTask.php | ||
| DatabaseBackupJob.php | ||
| DeleteResourceJob.php | ||
| DockerCleanupJob.php | ||
| GithubAppPermissionJob.php | ||
| PullChangelog.php | ||
| PullHelperImageJob.php | ||
| PullTemplatesFromCDN.php | ||
| PushServerUpdateJob.php | ||
| RegenerateSslCertJob.php | ||
| RestartProxyJob.php | ||
| ScheduledJobManager.php | ||
| ScheduledTaskJob.php | ||
| SendMessageToDiscordJob.php | ||
| SendMessageToPushoverJob.php | ||
| SendMessageToSlackJob.php | ||
| SendMessageToTelegramJob.php | ||
| SendWebhookJob.php | ||
| ServerCheckJob.php | ||
| ServerCleanupMux.php | ||
| ServerConnectionCheckJob.php | ||
| ServerFilesFromServerJob.php | ||
| ServerLimitCheckJob.php | ||
| ServerManagerJob.php | ||
| ServerPatchCheckJob.php | ||
| ServerStorageCheckJob.php | ||
| ServerStorageSaveJob.php | ||
| StripeProcessJob.php | ||
| SubscriptionInvoiceFailedJob.php | ||
| UpdateCoolifyJob.php | ||
| UpdateStripeCustomerEmailJob.php | ||
| ValidateAndInstallServerJob.php | ||
| VerifyStripeSubscriptionStatusJob.php | ||
| VolumeCloneJob.php | ||