Commit Graph
534 Commits
Author SHA1 Message Date
Aditya Tripathi a618e4c85e fix(teams): guard current_team_id clear against concurrent writes
Make clearStoredTeamIfMatches perform an atomic conditional UPDATE
so a concurrent team switch isn't clobbered, and call it for the
deleting owner in DeleteTeam so their stored team id doesn't point
at a deleted team. refreshSession now falls back to
resolveStoredTeam() instead of an arbitrary first team. Add a
return type to SelectTeam::render() and tests covering owner
deletion and concurrent-selection preservation.
2026-08-25 17:25:32 +00:00
Aditya Tripathi 11249502bd fix(teams): clear stale current_team_id when membership ends
Reset the user's persisted current_team_id when they are removed from
a team, when their team is deleted, or when refreshSession finds no
team left, so a dangling reference is never restored on next login.
2026-08-25 13:46:29 +00:00
Aditya Tripathi e99c6d0f30 feat(teams): persist active team and add team selection screen
Add current_team_id to users so the last active team is restored on
login instead of always defaulting to the personal team. When a user
belongs to multiple teams and has no valid stored choice, redirect
them to a new team.select screen (SelectTeam Livewire component) to
pick one, rather than silently choosing the first team. Update
Fortify and OAuth login flows to use the new resolveStoredTeam()
logic.
2026-08-25 12:45:47 +00:00
peaklabs-dev 58d074721c Merge remote-tracking branch 'origin/main' into next 2026-08-24 19:47:51 +02:00
Andras BacsaiandGitHub 60eff6fb6e fix(docker): update helper CLI for registry pushes (#11461) 2026-08-22 12:53:20 +02:00
Andras Bacsai ca5fcce39b Reapply "Merge branch 'next' into main"
This reverts commit 7bbd91175f.
2026-08-21 12:15:46 +02:00
Andras Bacsai 7bbd91175f Revert "Merge branch 'next' into main"
This reverts commit 2598f3e4c8, reversing
changes made to 83f1a2e503.
2026-08-21 12:12:56 +02:00
Andras Bacsai 81227670e6 Reapply "Merge origin/next into main"
This reverts commit 15359833d3.
2026-08-19 12:39:55 +02:00
Andras Bacsai 15359833d3 Revert "Merge origin/next into main"
This reverts commit 541d743907, reversing
changes made to bb1d3f13f2.
2026-08-19 12:33:16 +02:00
github-actions[bot] b9646630c6 Merge remote-tracking branch 'origin/main' into next 2026-08-18 21:41:15 +00:00
Andras BacsaiandGitHub 45d0ec7518 fix(dns): time out validation queries after five seconds (#11378) 2026-08-18 23:40:59 +02:00
Andras Bacsai fe9e1e46f5 Merge remote-tracking branch 'origin/main' into next 2026-08-18 16:17:26 +02:00
Andras Bacsai f9f26c547c fix(auth): preserve OAuth identity across email changes
Link OAuth logins by provider user ID before matching email, refresh identity
claims on login, and skip password confirmation for SSO-linked users.
2026-08-18 15:27:27 +02:00
Andras Bacsai 17d9d1a370 feat(domains): add configurable HTTPS redirects for service apps 2026-08-18 09:08:18 +02:00
Andras Bacsai 7162185400 fix(metrics): convert container memory samples from bytes to MB
Sentinel stores container used memory in bytes while application and
database charts label the series as megabytes. Convert those samples
before they reach the frontend so the graph is not inflated by ~1024x.
2026-08-13 10:58:28 +02:00
Andras Bacsai 003e44d123 Merge remote-tracking branch 'origin/next' into feat/noindex-domains 2026-08-08 11:26:20 +02:00
Andras Bacsai a7a06aa6c8 feat(ui): polish domains, storage, env vars and resource nav
Improve project resource UIs: sort domains by DNS failure, stop re-adding www pairs on refresh, lazy-load storage tabs with counts, tighten env-var tables, keep application tabs active across Livewire polls, unify database type labels, and update related CSS/JS and tests.
2026-08-05 13:50:11 +02:00
8ae56587d5 feat(ui): Shadow UI redesign, domain management, and DNS autoconfigure (#11119)
Co-authored-by: ShadowArcanist <162910371+ShadowArcanist@users.noreply.github.com>
2026-08-03 23:11:54 +02:00
Andras BacsaiandGitHub 0b843bb07c fix(compose): normalize service-name keys for domains and env vars (#11040) 2026-08-03 23:08:56 +02:00
Andras BacsaiandGitHub 913d033c75 fix(resources): clarify build server hosting restrictions (#10961) 2026-07-16 21:35:23 +02:00
Alberto Rizzi 4afe131905 feat(domains): add per-domain noindex support
Flagged domains are served with X-Robots-Tag: noindex, nofollow via
Traefik and Caddy routing labels, so an auto-generated technical domain
can be excluded from indexing while the production domain on the same
resource stays indexable.
2026-07-12 13:59:09 +02:00
Andras BacsaiandGitHub 9b060958aa fix(ray): remove Ray debug hooks from runtime (#10847) 2026-07-03 11:40:20 +02:00
Andras BacsaiandGitHub cf6f5a2678 feat(registry): add configurable docker registry url (#9017) 2026-07-02 18:52:46 +02:00
Andras Bacsai a06c1a7bf5 Improve storage mount path handling 2026-07-02 14:54:38 +02:00
Andras Bacsai 78d8afa602 Merge remote-tracking branch 'origin/next' into audit-policies 2026-06-15 12:05:19 +02:00
Andras Bacsai 22f9f96db6 chore: inspect staged changes for commit message 2026-06-04 15:24:53 +02:00
Andras Bacsai 062ad57740 fix(security): enforce team access on mutable actions
Authorize cloud provider token access, audit sensitive operations, and
standardize public IDs across deployment and resource flows.
2026-06-04 11:03:06 +02:00
Andras Bacsai 419a551d76 fix(server): return SSH username validation messages 2026-06-03 11:57:46 +02:00
Andras BacsaiandGitHub db83289a4a fix(team): prevent 500 when deleting the current team (#10353) 2026-05-29 19:09:25 +02:00
Andras BacsaiGitHubcoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
8dd5d01f69 Update bootstrap/helpers/shared.php
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-05-29 15:37:42 +02:00
Andras Bacsai fcd63f40eb fix(queue): route scheduled jobs through crons helper
Centralize scheduled job queue selection with crons_queue() and use it for scheduler, task, and database backup jobs so cloud runs on crons while self-hosted stays on high.
2026-05-22 16:26:15 +02:00
Andras Bacsai e2199f1223 fix(queue): route cloud jobs to dedicated queues
Use config-based queue selection for deployment and scheduled jobs so cloud dispatches deployments to `deployments` and scheduled jobs to `crons`, while self-hosted keeps using `high`.

Add coverage for deployment queue helper, start action routing, and scheduled job manager routing.
2026-05-22 16:11:24 +02:00
FirsakandClaude Opus 4.7 d415f3a3d1 fix(team): prevent 500 after deleting the current team
When a user deletes their current team, the session and cache still
reference the just-deleted team. `refreshSession()` then resolves that
stale team via `currentTeam()`, calls `Team::find()` (which returns
null because the row is gone) and dereferences `$team->id`, leaving the
session without a current team. The subsequent redirect to the team
page assigns the now-null `currentTeam()` to the non-nullable
`Team $team` property in `Team\Index::mount()`, throwing a TypeError
and producing an HTTP 500.

Guard `refreshSession()` against a deleted current team: fall back to
any team the user still belongs to, and if none remain, clear the
stale session reference instead of dereferencing null.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 11:06:32 +02:00
Andras Bacsai c6ac52dc38 fix(env): generate encoded secrets from raw random bytes
Use random_bytes before hex and base64 encoding so generated env values
match the expected decoded byte lengths. Add Pest coverage for HEX and
REALBASE64 magic variables.
2026-05-09 14:49:39 +02:00
Romain ROCHASandGitHub 0065970521 Merge branch 'next' into update-homarr 2026-05-08 19:16:02 +07:00
Andras Bacsai 79174b749d refactor(helpers): extract STANDALONE_DATABASE_MODELS registry, add tests
Replace 8× repeated per-type if-blocks in `queryDatabaseByUuidWithinTeam`
and `queryResourcesByUuid` with a single loop over the new
`STANDALONE_DATABASE_MODELS` constant.

Add unit tests to guard the registry against drift (keys mirror
`DATABASE_TYPES`, every entry is a valid Eloquent model with `team()`),
and feature tests covering team-ownership, wrong-team, and unknown-UUID
cases for `queryDatabaseByUuidWithinTeam`.
2026-04-30 14:48:48 +02:00
Romain ROCHAS e658d2f9a3 fix(magic env) HEX secrets creating double the length of their name 2026-04-27 16:37:16 +07:00
Andras Bacsai 19767a569b fix(navigation): replace wire:navigate.hover with wire:navigate
Remove hover prefetching variant from SPA navigation helper,
both in the happy path and the exception fallback.
2026-04-22 20:55:09 +02:00
Andras BacsaiandClaude Opus 4.7 a05d4e3a4b fix(database): tighten Postgres init script filename handling
Validate new init-script filenames against path traversal and shell
metacharacters via a new validateFilenameSafe() helper, and harden the
write/delete paths with basename() + escapeshellarg() so legacy rows
still deploy and can be cleaned up without regressions.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-20 21:26:34 +02:00
Andras BacsaiandGitHub 33518b24a2 refactor: tighten team scoping on resource creation and admin nav (#9651) 2026-04-19 12:01:11 +02:00
Andras Bacsai a478ac66eb refactor: scope destination and resource lookups by current team
Use find_destination_for_current_team helper across resource creation
flows and the destination controller. Pass full destination objects to
database creation helpers instead of UUIDs so team relationships are
resolved consistently before the resource is created or linked.

Add feature tests covering destination, backup storage, and resource
proof lookups across teams.
2026-04-19 11:55:12 +02:00
Iisyourdad d2ada90a47 fix(git): harden ssh URL normalization 2026-04-07 22:41:15 -05:00
Iisyourdad f877985e56 fix(git): preserve ssh scheme URLs with custom ports 2026-04-04 14:49:34 -05:00
Andras Bacsai 1a603a10ed fix(models): replace forceFill/forceCreate with fill/create and add fillable guards
Replace all uses of `forceFill`, `forceCreate`, and `forceFill` with their
non-force equivalents across models, actions, controllers, and Livewire
components. Add explicit `$fillable` arrays to all affected Eloquent models
to enforce mass assignment protection.

Add ModelFillableCreationTest and ModelFillableRegressionTest to verify that
model creation respects fillable constraints and prevent regressions.
2026-03-31 13:45:31 +02:00
Andras Bacsai 2692496726 fix(database): refresh SSL/status state and harden clone writes
Handle database status updates more reliably by listening for `ServiceChecked`
and using explicit `refresh()` handlers in Livewire database components.

Also switch guarded clone/create paths to `forceFill`/`forceCreate` in helper
flows to avoid missing persisted attributes during app/service cloning.

Update log/terminal font stacks to Geist (with bundled variable fonts) and add
coverage for SSL status refresh, persistent volume UUID cloning, and log font
styling.
2026-03-31 09:29:36 +02:00
Andras Bacsai e396c70903 refactor: simplify TrustHosts middleware and use APP_URL as base_url fallback
- Delegate host validation to parent class instead of custom implementation
- Update base_url() helper to use config('app.url') instead of url('/')
- Add test for APP_URL fallback when no FQDN or public IPs configured
- Remove dedicated TrustHostsMiddlewareTest (logic now tested via integration tests)
2026-03-28 12:12:48 +01:00
Andras Bacsai af3826eac0 feat(reset-password): add IPv6 support and header poisoning protection
- Add support for bracketed IPv6 addresses when FQDN is not configured
- Harden password reset URL generation against X-Forwarded-Host header poisoning
- Add test coverage for IPv6-only configurations with malicious headers
- Update imports and clean up exception syntax in shared helpers
2026-03-27 14:14:01 +01:00
Andras BacsaiandClaude Opus 4.6 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 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 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