mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-20 02:27:57 +00:00
Reject link-local targets even when allowlisted, link private-target errors to endpoint settings, and tighten persistent-volume table widths.
22 lines
708 B
PHP
22 lines
708 B
PHP
<?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');
|
|
});
|