Commit graph

14988 commits

Author SHA1 Message Date
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
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
Andras Bacsai
a980b1352f chore(versions): bump sentinel to 0.0.21 2026-03-24 11:48:04 +01:00
Andras Bacsai
d3beeb2d00 fix(subscription): prevent duplicate subscriptions with updateOrCreate
- Replace manual subscription create/update logic with updateOrCreate() and firstOrCreate() to eliminate race conditions
- Add validation in PricingPlans to prevent subscribing if team already has active subscription
- Improve error handling for missing team_id in customer.subscription.updated event
- Add tests verifying subscriptions are updated rather than duplicated
2026-03-24 10:52:41 +01:00
Andras Bacsai
233f53494e
fix(team): resolve server limit checks for API token authentication (#9123) 2026-03-24 08:12:56 +01:00
Andras Bacsai
520e048ed5 refactor(team): update serverOverflow to use static serverLimit 2026-03-24 08:08:57 +01:00
Andras Bacsai
45114c8165
fix(validation): make hostname validation case-insensitive and expand allowed name characters (#9134) 2026-03-24 08:03:50 +01:00
Andras Bacsai
988dd57cf4 feat(validation): make hostname validation case-insensitive and expand allowed characters
- Normalize hostnames to lowercase for RFC 1123 compliance while accepting uppercase input
- Expand NAME_PATTERN to allow parentheses, hash, comma, colon, and plus characters
- Add fallback to random name generation when application name doesn't meet minimum requirements
- Add comprehensive test coverage for validation patterns and edge cases
2026-03-24 08:03:08 +01:00
Andras Bacsai
0aee5a41ae
fix(deployment): properly escape shell arguments in nixpacks commands (#9122) 2026-03-23 21:58:04 +01:00
Andras Bacsai
e37cb98c7c refactor(team): make server limit methods accept optional team parameter
Allow serverLimit() and serverLimitReached() to accept an optional team
parameter instead of relying solely on the current session. This improves
testability and makes the methods more flexible by allowing them to work
without session state.

Add comprehensive tests covering various scenarios including no session,
team at limit, and team under limit.
2026-03-23 21:56:50 +01:00
Andras Bacsai
dac940807a fix(deployment): properly escape shell arguments in nixpacks commands
Add escapeShellValue() helper function to safely escape shell values by wrapping
them in single quotes and escaping embedded quotes. Use this function throughout
the nixpacks command building to prevent shell injection vulnerabilities when
passing user-provided build commands, start commands, and environment variables.

This fixes unsafe string concatenation that could allow command injection when
user input contains special shell characters like &&, |, ;, etc.
2026-03-23 21:55:46 +01:00
Andras Bacsai
8457e22863
fix(github-webhook): handle unsupported event types gracefully (#9119) 2026-03-23 21:34:29 +01:00
Andras Bacsai
b931418c1e fix(github-webhook): handle unsupported event types gracefully
Add validation in manual and normal webhook handlers to reject GitHub
event types other than 'push' and 'pull_request'. Unsupported events
now return a graceful response instead of potentially causing
downstream errors. Includes tests for ping events, unsupported event
types, and unknown events.
2026-03-23 21:33:40 +01:00
Andras Bacsai
c09d7e412e feat(monitoring): add Laravel Nightwatch monitoring support
- Install laravel/nightwatch package for application monitoring
- Create Nightwatch console command to start the monitoring agent
- Add NIGHTWATCH_ENABLED and NIGHTWATCH_TOKEN environment variables
- Configure nightwatch settings in config/constants.php
- Set up Docker s6-overlay services for both development and production
- Disable Nightwatch by default in test environment
2026-03-23 15:36:47 +01:00
Andras Bacsai
ae33447994 feat(storage): add storage endpoints and UUID support for databases and services
- Add storage endpoints (list, create, update, delete) to DatabasesController
- Add storage endpoints (list, create, update, delete) to ServicesController
- Add UUID field and migration for local_persistent_volumes table
- Update LocalPersistentVolume model to extend BaseModel
- Support UUID-based storage identification in ApplicationsController
- Update OpenAPI documentation with new storage endpoints and schemas
- Fix application name generation to extract repo name from full git path
- Add comprehensive tests for storage API operations
2026-03-23 15:15:02 +01:00
Claude
23b52487c4
Disable booklore service template
Add `# ignore: true` to the booklore compose file so the service
template generator skips it, hiding it from the UI.

https://claude.ai/code/session_01Y7ZeGwqPp97oXwyLCPja9k
2026-03-23 09:53:07 +00:00
Andras Bacsai
3d5fee4d36 fix(environment-variable): guard refresh against missing or stale variables
Add early return in refresh() to skip sync operations if the environment variable no longer exists or is not fresh, preventing errors when refreshing stale or deleted variables.
2026-03-23 10:52:59 +01:00
Andras Bacsai
f8f27fff13 refactor(scheduler): extract cron scheduling logic to shared helper
Extract the shouldRunNow() method from ScheduledJobManager and ServerManagerJob into
a reusable shouldRunCronNow() helper function. This centralizes cron scheduling logic
and enables consistent deduplication behavior across all scheduled job types.

- Create shouldRunCronNow() helper in bootstrap/helpers/shared.php with timezone
  and dedup support
- Refactor ScheduledJobManager and ServerManagerJob to use the shared helper
- Add ScheduledJobDiagnostics command for inspecting cache state and scheduling
  decisions across all scheduled jobs
- Simplify shouldRunNow tests to directly test the helper function
- Add DockerCleanupJob test for error handling and execution tracking
- Increase scheduled log retention from 1 to 7 days
2026-03-23 10:37:49 +01:00
Andras Bacsai
89f2b83104 style(modal-confirmation): improve mobile responsiveness
Make modal full-screen on mobile devices with responsive padding,
border radius, and dimensions. Modal is now full-screen on small
screens and constrained to max-width/max-height on larger screens.
2026-03-23 10:36:08 +01:00
Andras Bacsai
f0ed05b399 fix(docker): log failed cleanup attempts when server is not functional 2026-03-23 10:35:47 +01:00
Andras Bacsai
069bf4cc82 chore(versions): bump coolify, sentinel, and traefik versions 2026-03-23 10:35:16 +01:00
Andras Bacsai
820ee1c03c docs(sponsors): update Brand.dev to Context.dev 2026-03-23 10:34:58 +01:00
Andras Bacsai
8be226788e
fix(deployment): disable build server during restart operations (#9045) 2026-03-20 16:16:46 +01:00