fix: remove hardcoded domain hub.host.uk.com from WorkspaceController #8

Open
opened 2026-02-20 16:35:03 +00:00 by Clotho · 0 comments
Member

Problem

Controllers/WorkspaceController.php has the domain hub.host.uk.com hardcoded in two places:

  1. Line 140 (store method): Sets $validated['domain'] = 'hub.host.uk.com' on workspace creation
  2. Line 262 (switch method): Filters workspaces by where('domain', 'hub.host.uk.com') when clearing default flags

Impact

  • Any deployment on a different domain will have incorrect workspace domain assignments
  • The switch workspace endpoint silently fails to clear defaults for workspaces on other domains
  • Makes the package non-reusable across environments

Acceptance Criteria

  • Extract domain to config('tenant.default_domain') with sensible default
  • Update both store and switch methods to use configuration
  • Add config documentation

Discovered during automated scan (issue #3)

## Problem `Controllers/WorkspaceController.php` has the domain `hub.host.uk.com` hardcoded in two places: 1. **Line 140 (`store` method):** Sets `$validated['domain'] = 'hub.host.uk.com'` on workspace creation 2. **Line 262 (`switch` method):** Filters workspaces by `where('domain', 'hub.host.uk.com')` when clearing default flags ## Impact - Any deployment on a different domain will have incorrect workspace domain assignments - The `switch` workspace endpoint silently fails to clear defaults for workspaces on other domains - Makes the package non-reusable across environments ## Acceptance Criteria - Extract domain to `config('tenant.default_domain')` with sensible default - Update both `store` and `switch` methods to use configuration - Add config documentation _Discovered during automated scan (issue #3)_
Clotho added the
discovery
bug
labels 2026-02-20 16:35:03 +00:00
Clotho was assigned by Charon 2026-02-21 00:01:44 +00:00
Charon added the
agent-ready
label 2026-02-21 01:32:01 +00:00
Sign in to join this conversation.
No description provided.