Prüfe die Bestätigungslinks gegen die tatsächlich aufgerufene Adresse.
Deploy Test / test (push) Successful in 12s
Deploy Test / deploy (push) Successful in 22s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-11-15 09:15:54 +01:00
1 parent fe03b0804c
commit 2113378e81
1 file changed
+5 -2
+5 -2
View File
@@ -63,11 +63,14 @@ public function test_placeholder_app_url_uses_the_address_opened_in_the_browser(
'adult' => '1',
]);
$response->assertRedirect('http://localhost:8000/email/bestaetigen');
$response->assertRedirect(url('/email/bestaetigen'));
$user = User::query()->where('email', 'probe@example.test')->firstOrFail();
Notification::assertSentTo($user, VerifyEmail::class, function (VerifyEmail $notification) use ($user): bool {
return str_contains($notification->toMail($user)->actionUrl, 'http://localhost:8000/email/bestaetigen/');
$link = $notification->toMail($user)->actionUrl;
return str_starts_with($link, url('/email/bestaetigen/'))
&& ! str_contains($link, 'CHANGE-ME.example');
});
}