Commit Graph

15009 Commits

Author SHA1 Message Date
Andras Bacsai e39678aea5 refactor: split invitation endpoint into GET/POST flow (#9192) 2026-03-26 14:46:27 +01:00
Andras Bacsai 25d424c743 refactor: split invitation endpoint into GET (show) and POST (accept)
Refactor the invitation acceptance flow to use a landing page pattern:
- GET shows invitation details (team name, role, confirmation button)
- POST processes the acceptance with proper form submission
- Remove unused revoke GET route (handled by Livewire component)
- Add Blade view for the invitation landing page
- Add feature tests for the new invitation flow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 14:30:27 +01:00
Andras Bacsai 5ed77f337a Add URL validation for GitHub source fields (#9190) 2026-03-26 13:48:07 +01:00
Andras Bacsai 0fce7fa948 fix: add URL validation for GitHub source api_url and html_url fields
Add SafeExternalUrl validation rule that ensures URLs point to
publicly-routable hosts. Apply to all GitHub source entry points
(Livewire Create, Livewire Change, API create and update).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 13:45:33 +01:00
Andras Bacsai 2729dffb3e refactor: simplify remote process chain and harden ActivityMonitor (#9189) 2026-03-26 13:28:37 +01:00
Andras Bacsai 3e0d48faea refactor: simplify remote process chain and harden ActivityMonitor
- Inline PrepareCoolifyTask and CoolifyTaskArgs into remote_process(),
  removing two single-consumer abstraction layers
- Add #[Locked] attribute to ActivityMonitor $activityId property
- Add team ownership verification in ActivityMonitor.hydrateActivity()
  with server_uuid fallback and fail-closed default
- Store team_id in activity properties for proper scoping
- Update CLAUDE.md to remove stale reference
- Add comprehensive tests for activity monitor authorization

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 13:26:16 +01:00
Andras Bacsai c8efbf107a fix(storage): use escapeshellarg for volume names in shell commands (#9185) 2026-03-26 13:08:10 +01:00
Andras Bacsai f9a9dc80aa fix(api): add volume name validation to storage API endpoints
Apply the same Docker volume name pattern validation to the API
create and update storage endpoints for applications, databases,
and services controllers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 12:17:39 +01:00
Andras Bacsai d2064dd499 fix(storage): use escapeshellarg for volume names in shell commands
Add proper shell escaping for persistent volume names when used in
docker volume rm commands. Also add volume name validation pattern
to ValidationPatterns for consistent input checking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 11:06:30 +01:00
Andras Bacsai d77e4c864f fix(backup): use escapeshellarg for credentials in backup commands (#9175) 2026-03-26 07:50:09 +01:00
Andras Bacsai fecb80b596 fix(storage): consistent path validation and escaping for file volumes (#9176) 2026-03-26 07:44:46 +01:00
Andras Bacsai 3fdce06b65 fix(storage): consistent path validation and escaping for file volumes
Ensure all file volume paths are validated and properly escaped before
use. Previously, only directory mount paths were validated at the input
layer — file mount paths now receive the same treatment across Livewire
components, API controllers, and the model layer.

- Validate and escape fs_path at the top of saveStorageOnServer() before
  any commands are built
- Add path validation to submitFileStorage() in Storage Livewire component
- Add path validation to file mount creation in Applications, Services,
  and Databases API controllers
- Add regression tests for path validation coverage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 23:44:37 +01:00
Andras Bacsai 952f324797 fix(backup): use escapeshellarg for credentials in database backup commands
Apply proper shell escaping to all user-controlled values interpolated into
backup shell commands (PostgreSQL username/password, MySQL/MariaDB root
password, MongoDB URI). Also URL-encode MongoDB credentials before embedding
in connection URI. Adds unit tests for escaping behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 23:43:57 +01:00
Andras Bacsai ad95d65aca fix(deployment): normalize whitespace in pre/post deployment commands (#9173) 2026-03-25 20:59:18 +01:00
Andras Bacsai 6f163ddf02 fix(deployment): normalize whitespace in pre/post deployment commands
Ensure pre_deployment_command and post_deployment_command have consistent
whitespace handling, matching the existing pattern used for health_check_command.
Adds regression tests for the normalization behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 20:57:17 +01:00
Andras Bacsai 47668121a4 feat(deployment): add command_hidden flag to hide command text in logs (#9167) 2026-03-25 20:51:07 +01:00
Andras Bacsai 944a038349 fix(livewire): add input validation to unmanaged container operations (#9172) 2026-03-25 20:42:57 +01:00
Andras Bacsai ae31111813 fix(livewire): add input validation to unmanaged container operations
Add container name validation and shell argument escaping to
startUnmanaged, stopUnmanaged, restartUnmanaged, and restartContainer
methods, consistent with existing patterns used elsewhere in the
codebase.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 20:42:00 +01:00
Andras Bacsai e2ba44d0c3 fix(validation): allow ampersands and quotes in shell-safe command pattern
Previously, the SHELL_SAFE_COMMAND_PATTERN was overly restrictive and blocked
legitimate characters needed for common Docker operations:

- Allow & for command chaining with && in multi-step build commands
- Allow " for build arguments with spaces (e.g., --build-arg KEY="value")

Update validation messages to reflect the new allowed operators and refactor
code to use imports instead of full class paths for better readability.
2026-03-25 20:27:21 +01:00
Andras Bacsai c8a96b6f12 fix(livewire): add Locked attributes and consolidate container name validation (#9171) 2026-03-25 20:26:42 +01:00
Andras Bacsai d486bf09ab fix(livewire): add Locked attributes and consolidate container name validation
- Add #[Locked] to server-set properties on Import component (resourceId,
  resourceType, serverId, resourceUuid, resourceDbType, container) to
  prevent client-side modification via Livewire wire protocol
- Add container name validation in runImport() and restoreFromS3()
  using shared ValidationPatterns::isValidContainerName()
- Scope server lookup to current team via ownedByCurrentTeam()
- Consolidate duplicate container name regex from Import,
  ExecuteContainerCommand, and Terminal into shared
  ValidationPatterns::isValidContainerName() static helper
- Add tests for container name validation, locked attributes, and
  team-scoped server lookup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 20:21:39 +01:00
Andras Bacsai 0fed553207 fix(settings): require instance admin authorization for updates page 2026-03-25 19:33:51 +01:00
Andras Bacsai f0c8ff6a77 Update ByHetzner.php 2026-03-25 19:26:13 +01:00
Andras Bacsai 3470f8b2a6 add new skills 2026-03-25 19:22:09 +01:00
Andras Bacsai 0a621bb90e update laravel boost 2026-03-25 19:21:53 +01:00
Andras Bacsai bc91b41f92 fix(terminal): apply authorization middleware to terminal bootstrap routes (#9169) 2026-03-25 18:44:08 +01:00
Andras Bacsai 847166a3f8 fix(terminal): apply authorization middleware to terminal bootstrap routes
Apply the existing `can.access.terminal` middleware to `POST /terminal/auth`
and `POST /terminal/auth/ips` routes, consistent with the `GET /terminal` route.

Adds regression tests covering unauthenticated, member, admin, and owner roles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:56:37 +01:00
Andras Bacsai b1de75a7c6 fix(backup): validate MongoDB collection names in backup input (#9168) 2026-03-25 16:55:33 +01:00
Andras Bacsai 99043600ee fix(backup): validate MongoDB collection names in backup input
Add validateDatabasesBackupInput() helper that properly parses all
database backup formats including MongoDB's "db:col1,col2|db2:col3"
and validates each component individually.

- Validate and escape collection names in DatabaseBackupJob
- Replace comma-only split in BackupEdit with format-aware validation
- Add input validation in API create_backup and update_backup endpoints
- Add unit tests for collection name and multi-format validation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:52:06 +01:00
Andras Bacsai 333cc9589d feat(deployment): add command_hidden flag to hide command text in logs
Add support for hiding sensitive command text while preserving output logs.
When command_hidden is true, the command text is set to null in the main log
entry but logged separately to the deployment queue with proper redaction.

- Add command_hidden parameter to execute_remote_command and executeCommandWithProcess
- When enabled, separates command visibility from output visibility
- Fix operator precedence in type ternary expression
2026-03-25 16:48:49 +01:00
Andras Bacsai 1bd957073b fix(api): validate server ownership in domains endpoint and scope activity lookups (#9166) 2026-03-25 16:21:41 +01:00
Andras Bacsai a94517f452 fix(api): validate server ownership in domains endpoint and scope activity lookups
- Add team-scoped server validation to domains_by_server API endpoint
- Filter applications and services to only those on the requested server
- Scope ActivityMonitor activity lookups to the current team
- Fix query param disambiguation (query vs route param) in domains endpoint
- Fix undefined $ip variable in services domain collection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:20:53 +01:00
Andras Bacsai 69ea7dfa50 docs(tdd): add bug fix workflow section with TDD requirements
Add a new "Bug Fix Workflow (TDD)" section that establishes the strict
test-driven development process for bug fixes. Clarify that every bug fix
must follow TDD: write a failing test, fix the bug, verify the test passes
without modification. Update the Key Conventions to reference this workflow.
2026-03-25 14:08:48 +01:00
Andras Bacsai 9f13f25149 Merge remote-tracking branch 'origin/next' into next 2026-03-25 14:08:26 +01:00
Andras Bacsai fbdcf0de51 fix(preview-env): ensure auto-created preview env vars inherit runtime/buildtime flags (#9164) 2026-03-25 13:42:18 +01:00
Andras Bacsai 3034e89edb feat(preview-env): add production variable fallback for docker-compose
When preview environment variables are configured, fall back to production
variables for keys not overridden by preview values. This ensures variables
like DB_PASSWORD that exist only in production are available in the preview
.env file, enabling proper ${VAR} interpolation in docker-compose YAML.

Fallback only applies when preview variables are configured, preventing
unintended leakage of production values when previews aren't in use.

Also improves UI by hiding the Domains section when only database services
are present, and simplifies the logs view by removing status checks.
2026-03-25 13:26:50 +01:00
Andras Bacsai ca769baf17 chore: bump version to 4.0.0-beta.471 2026-03-25 13:25:41 +01:00
Andras Bacsai c2c18a2f0f fix(backup): prevent notification failures from affecting backup status (#9162) 2026-03-25 12:45:37 +01:00
Andras Bacsai 14a7f8646c fix(backup): prevent notification failures from affecting backup status
- Wrap notification calls in try-catch blocks to log failures instead
- Prevent failed() method from overwriting successful backup status
- Skip failure notifications if backup already completed successfully
- Ensures post-backup errors (e.g. notification failures) never
  retroactively mark successful backups as failed

Fixes #9088
2026-03-25 12:43:47 +01:00
Andras Bacsai b8b49b9f42 chore(docker): update container image versions
- Bump coolify-realtime from 1.0.10 to 1.0.11
- Pin redis to 7-alpine across all compose files
- Remove unnecessary quotes in extra_hosts entries
2026-03-25 07:13:54 +01:00
Andras Bacsai e6de2618f9 feat(sync): sync install.sh, docker-compose, and env files to GitHub
Adds syncFilesToGitHubRepo method to handle syncing install.sh,
docker-compose, and env files to the coolify-cdn repository via a
feature branch and PR. Supports both nightly and production environments.
2026-03-25 07:07:22 +01:00
Andras Bacsai bf306ffad3 chore: bump version to 4.0.0-beta.470 2026-03-24 21:57:40 +01:00
Andras Bacsai 5c460dd2a1 fix(proxy): validate stored config matches proxy type (#9146) 2026-03-24 21:53:48 +01:00
Andras Bacsai 4f1f8713e9 fix(parsers): preserve ${VAR} references in compose instead of resolving to DB values (#9147) 2026-03-24 21:53:11 +01:00
Andras Bacsai 6a14a12a58 fix(parsers): preserve ${VAR} references in compose instead of resolving to DB values
Do not replace self-referencing environment variables (e.g., DATABASE_URL: ${DATABASE_URL})
with saved DB values in the compose environment section. Keeping the reference intact allows
Docker Compose to resolve from .env at deploy time, preventing stale values from overriding
user updates that haven't been re-parsed.

Fixes #9136
2026-03-24 21:52:36 +01:00
Andras Bacsai b8e52c6a45 feat(proxy): validate stored config matches current proxy type
Add validation in GetProxyConfiguration to detect when stored proxy config
belongs to a different proxy type (e.g., Traefik config on a Caddy server)
and trigger regeneration with a warning log. Clear cached proxy configuration
and settings when proxy type is changed to prevent stale configs from being
reused. Includes tests verifying config rejection on type mismatch and
graceful fallback on invalid YAML.
2026-03-24 21:32:34 +01:00
Andras Bacsai eebb8609a7 Add EspoCRM, provided by the official team (#8658) 2026-03-24 14:27:41 +01:00
Andras Bacsai 1af20a9567 chore(service): disable Booklore service (#9105) 2026-03-24 14:27:21 +01:00
Andras Bacsai 534b8be8d0 refactor(docker): simplify installation and remove version pinning
- Remove hardcoded Docker version constraints (27.0 → latest)
- Use official Docker install script (get.docker.com) instead of rancher URLs
- Simplify installation logic by removing nested version fallback checks
- Consolidate OS-specific installation methods and improve Arch Linux upgrade handling
2026-03-24 14:17:05 +01:00
Andras Bacsai efcd5e7dbf docs(readme): add PetroSky Cloud to sponsors 2026-03-24 12:37:11 +01:00