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:
Andras Bacsai
2026-08-14 13:34:00 +02:00
parent 857375f69c
commit a257224bb7
8 changed files with 126 additions and 185 deletions
+21
View File
@@ -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');
});