coolify/bootstrap/helpers
Andras Bacsai 53cd2a6e86 refactor: harden and deduplicate validateShellSafePath
Changes:
- Added tab character ("\t") to dangerous characters list as token separator
- Removed redundant regex-based preg_match block (lines 147-152)
- Characters $(, ${, and backticks were already covered in $dangerousChars array
- Simplified function to rely solely on $dangerousChars loop

Security improvement:
- Tab characters can act as token separators in shell contexts
- Now explicitly blocked with descriptive error message

Tests:
- Added test for tab character blocking
- All 78 security tests pass (213 assertions)
- No regression in existing functionality

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-16 09:51:37 +02:00
..
api.php feat(domains): add force_domain_override option and enhance domain conflict detection responses 2025-08-28 11:21:30 +02:00
applications.php refactor(clone): enhance application cloning by separating production and preview environment variable handling 2025-09-11 12:52:35 +02:00
constants.php update bitnami to bitnamilegacy 2025-10-03 15:48:11 +01:00
databases.php feat(backup): enhance backup job with S3 upload handling and notifications 2025-10-07 15:02:23 +02:00
docker.php Changes auto-committed by Conductor 2025-10-16 08:51:15 +02:00
domains.php feat(domains): add force_domain_override option and enhance domain conflict detection responses 2025-08-28 11:21:30 +02:00
github.php refactor(github): enhance API request handling and validation 2025-09-22 15:41:56 +02:00
notifications.php refactor(configuration): centralize configuration management in ConfigurationRepository 2025-03-24 21:01:27 +01:00
parsers.php fix: use canonical parser for Windows path validation 2025-10-16 09:51:37 +02:00
proxy.php feat(proxy): enhance proxy configuration regeneration by extracting custom commands 2025-10-07 11:11:13 +02:00
remoteProcess.php refactor(remoteProcess): remove redundant file transfer functions for improved clarity 2025-09-22 12:54:37 +02:00
services.php Revert "refactor(file-transfer): replace base64 encoding with direct file transfer method in various components for improved clarity and efficiency" 2025-09-15 17:56:48 +02:00
shared.php refactor: harden and deduplicate validateShellSafePath 2025-10-16 09:51:37 +02:00
socialite.php refactor(dashboard): remove deployment loading logic and introduce DeploymentsIndicator component for better UI management 2025-09-30 11:43:30 +02:00
subscriptions.php feat(email): implement email change request and verification process 2025-08-18 14:54:08 +02:00
sudo.php feat(sudo-helper): add helper functions for command parsing and ownership management with sudo 2025-09-09 09:00:42 +02:00
timezone.php refactor: improve data formatting and UI 2025-01-15 18:35:20 +01:00