coolify/app
Andras Bacsai 4cc668253e fix(database): prevent malformed URLs when server IP is empty
Add defensive null/empty checks in externalDbUrl() for all standalone database models to prevent "invalid proto:" errors when server IP is not available.

**Problem:**
When `$this->destination->server->getIp` returns null or empty string, database URLs become malformed (e.g., `mongodb://user:pass@:27017` with empty host), causing "invalid proto:" validation errors.

**Solution:**
Added early return with null check in externalDbUrl() method for all 8 database types:
- Check if server IP is empty before building URL
- Return null instead of generating malformed URL
- Maintains graceful degradation - UI handles null URLs appropriately

**Defense in Depth:**
While mount() guard (from commit 74c70b431) prevents most cases, this adds an additional safety layer for edge cases:
- Race conditions during server updates
- State changes between mount and URL access
- Direct model access bypassing Livewire lifecycle

**Affected Models:**
- StandaloneMongodb
- StandalonePostgresql
- StandaloneMysql
- StandaloneMariadb
- StandaloneClickhouse
- StandaloneRedis
- StandaloneKeydb
- StandaloneDragonfly

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 11:46:24 +01:00
..
Actions Changes auto-committed by Conductor 2025-10-16 17:13:47 +02:00
Console Update app/Console/Commands/CleanupRedis.php 2025-10-24 13:20:24 +02:00
Contracts
Data
Enums
Events work work on hetzner integration 2025-10-09 16:54:13 +02:00
Exceptions feat(exceptions): introduce NonReportableException to handle known errors and update Handler for selective reporting 2025-09-08 09:18:25 +02:00
Helpers feat(ssh-multiplexing): add connection age metadata handling to improve multiplexed connection management 2025-09-10 08:38:36 +02:00
Http Changes auto-committed by Conductor 2025-10-20 12:59:57 +02:00
Jobs refactor: remove deprecated next() method 2025-10-26 09:20:30 +01:00
Listeners refactor(proxy): streamline proxy status handling and improve dashboard availability checks 2025-06-11 12:02:39 +02:00
Livewire Merge pull request #6984 from Cinzya/feature/fix-allowedall-check 2025-10-26 11:00:15 +01:00
Models fix(database): prevent malformed URLs when server IP is empty 2025-10-27 11:46:24 +01:00
Notifications Merge pull request #6837 from coollabsio/andrasbacsai/custom-webhooks 2025-10-12 10:57:47 +02:00
Policies Changes auto-committed by Conductor 2025-10-17 23:04:24 +02:00
Providers fix: register WebhookNotificationSettings with NotificationPolicy 2025-10-10 17:48:14 +02:00
Repositories
Rules feat: add YAML validation for cloud-init scripts 2025-10-11 13:56:55 +02:00
Services fix: filter deprecated server types for Hetzner 2025-10-22 00:13:55 +02:00
Support feat(validation): centralize validation patterns for names and descriptions 2025-08-19 12:14:48 +02:00
Traits Changes auto-committed by Conductor 2025-10-16 09:51:37 +02:00
View/Components refactor: replace random ID generation with Cuid2 for unique HTML IDs in form components 2025-10-16 12:54:14 +02:00