Sicherheitsupdate nach Audit (0.29.0)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 7m50s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 7m34s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 5m45s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 5m30s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 7m7s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 7m9s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 6m8s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 6m5s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 48s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m5s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 7m50s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 7m34s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 5m45s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 5m30s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 7m7s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 7m9s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 6m8s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 6m5s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 48s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m5s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a37895a16a
commit
f1202bea08
226 changed files with 1952 additions and 450 deletions
|
|
@ -15,6 +15,7 @@ use Illuminate\Support\Facades\Notification;
|
|||
use Illuminate\Support\Facades\Storage;
|
||||
use Inertia\Testing\AssertableInertia as Assert;
|
||||
use Inhaus\Plugins\Forms\Filament\Resources\Forms\Pages\CreateForm;
|
||||
use Inhaus\Plugins\Forms\Filament\Resources\Forms\Pages\EditForm;
|
||||
use Inhaus\Plugins\Forms\Filament\Resources\Forms\Pages\FormResults;
|
||||
use Inhaus\Plugins\Forms\Filament\Resources\Forms\Pages\ListForms;
|
||||
use Inhaus\Plugins\Forms\Mail\FormSubmitted;
|
||||
|
|
@ -388,4 +389,23 @@ class FormsTest extends TestCase
|
|||
$this->assertArrayNotHasKey('locked', $saved[1]['data']);
|
||||
$this->assertArrayNotHasKey('locked', $saved[2]['data']);
|
||||
}
|
||||
|
||||
public function test_form_editors_without_result_access_cannot_redirect_submissions(): void
|
||||
{
|
||||
$form = $this->trainingForm(['notify_emails' => ['personal@firma.de'], 'anonymous' => true]);
|
||||
$role = Role::query()->create(['name' => 'Formular-Redaktion']);
|
||||
$role->grants()->create(['ability' => 'forms.edit', 'resource_type' => 'form', 'resource_id' => $form->id]);
|
||||
$role->grants()->create(['ability' => 'news.manage']); // Zugang zum Backend
|
||||
$editor = User::factory()->withRoles([$role])->create();
|
||||
|
||||
$this->actingAs($editor);
|
||||
Livewire::test(EditForm::class, ['record' => $form->getRouteKey()])
|
||||
->set('data.settings.notify_emails', ['angreifer@example.org'])
|
||||
->set('data.settings.anonymous', false)
|
||||
->call('save');
|
||||
|
||||
$settings = $form->fresh()->settings;
|
||||
$this->assertSame(['personal@firma.de'], $settings['notify_emails']);
|
||||
$this->assertTrue($settings['anonymous']);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue