
Andras BacsaiandClaude
f254af0459
security: escape all shell directory paths in Git deployment commands
Ensures all `cd` commands in Git deployment operations use properly escaped
directory paths via `escapeshellarg()` to prevent shell injection vulnerabilities
and handle special characters correctly.
**Changes:**
1. `setGitImportSettings()` method:
- Added `$escapedBaseDir` variable for consistent path escaping
- Replaced all 5 instances of `cd {$baseDir}` with `cd {$escapedBaseDir}`
- Affects: commit checkout, submodules, and LFS operations
2. `generateGitImportCommands()` method (deploy_key type):
- Replaced 3 instances in pull request handling for GitLab, GitHub/Gitea, Bitbucket
3. `generateGitImportCommands()` method (other type):
- Replaced 3 instances in pull request handling for GitLab, GitHub/Gitea, Bitbucket
**Security Impact:**
- Prevents shell injection from malicious directory paths
- Fixes parsing issues with special characters (@, ~, spaces)
- Consistent escaping across all deployment types: source, deploy_key, other
- Complements existing URL escaping for comprehensive security
**Testing:**
- All existing unit tests pass (5/5 Git ls-remote parsing tests)
- Code formatted with Laravel Pint
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 17:23:28 +02:00
..
2025-10-14 17:23:28 +02:00
2025-10-04 18:02:20 +02:00
2025-08-28 10:11:56 +02:00
2025-09-05 14:30:51 +02:00
2024-12-10 08:50:07 +01:00
2025-10-11 11:16:28 +02:00
2025-10-09 12:53:57 +02:00
2025-05-26 14:03:59 +02:00
2025-01-15 17:11:15 +01:00
2025-05-26 14:03:59 +02:00
2025-10-08 19:58:36 +02:00
2025-09-18 18:14:54 +02:00
2025-02-11 17:07:57 +01:00
2024-10-24 13:28:31 +02:00
2025-03-24 17:55:10 +01:00
2025-10-03 20:05:43 +02:00
2025-10-03 20:05:43 +02:00
2025-06-18 14:29:46 +02:00
2024-06-10 20:43:34 +00:00
2025-10-09 10:41:29 +02:00
2025-09-30 13:37:03 +02:00
2024-02-16 21:56:38 +01:00
2025-05-26 14:03:59 +02:00
2025-08-19 12:14:48 +02:00
2025-09-26 08:24:38 +02:00
2025-10-07 15:02:23 +02:00
2025-08-19 12:14:48 +02:00
2024-01-01 18:23:58 -08:00
2025-10-09 17:00:05 +02:00
2025-05-29 14:09:05 +02:00
2025-10-03 20:05:43 +02:00
2025-01-07 15:31:43 +01:00
2025-04-30 16:44:44 +02:00
2025-08-26 10:27:38 +02:00
2025-05-26 14:03:59 +02:00
2025-02-07 19:36:52 +01:00
2025-09-19 10:17:55 +02:00
2025-08-19 12:14:48 +02:00
2025-09-19 10:17:55 +02:00
2025-09-19 10:17:55 +02:00
2025-09-19 10:17:55 +02:00
2025-09-19 10:17:55 +02:00
2025-09-19 10:17:55 +02:00
2025-09-19 10:17:55 +02:00
2025-09-19 10:17:55 +02:00
2025-01-07 15:31:43 +01:00
2025-01-07 15:31:43 +01:00
2025-08-19 12:14:48 +02:00
2025-10-12 10:57:47 +02:00
2025-09-25 11:33:32 +02:00
2025-05-26 14:03:59 +02:00
2025-09-05 17:44:34 +02:00
2025-08-12 10:07:11 +02:00
2025-10-10 15:37:00 +02:00