Prüfe die Bestätigungslinks gegen die tatsächlich aufgerufene Adresse.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
fe03b0804c
commit
2113378e81
1 file changed
+5
-2
@@ -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');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user