mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-20 14:23:44 +00:00
fix(validation): improve private URL handling and error feedback
Reject link-local targets even when allowlisted, link private-target errors to endpoint settings, and tighten persistent-volume table widths.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
use Illuminate\Support\Facades\View;
|
||||
use Illuminate\Support\MessageBag;
|
||||
use Illuminate\Support\ViewErrorBag;
|
||||
|
||||
it('renders a trailing validation error URL as a link', function () {
|
||||
$settingsUrl = route('settings.advanced').'#endpoint-section';
|
||||
$errors = new ViewErrorBag;
|
||||
$errors->put('default', new MessageBag([
|
||||
'endpoint' => "Local or private IP addresses are not allowed. Configure allowed internal targets: {$settingsUrl}",
|
||||
]));
|
||||
View::share('errors', $errors);
|
||||
|
||||
$html = Blade::render('<x-forms.input id="endpoint" />');
|
||||
|
||||
expect($html)
|
||||
->toContain('href="'.$settingsUrl.'"')
|
||||
->toContain('Set them here');
|
||||
});
|
||||
Reference in New Issue
Block a user