10.April 2026

This commit is contained in:
Kevin Adametz 2026-04-10 17:15:27 +02:00
parent a00c42e770
commit f58c709945
208 changed files with 19280 additions and 2914 deletions

View file

@ -0,0 +1,25 @@
<?php
uses(Tests\TestCase::class);
it('does not throw when session locale is a malicious string', function () {
$response = $this->withSession(['locale' => '-1 or 5*5=25 --'])
->get('/impressum');
$response->assertSuccessful();
});
it('applies a valid session locale', function () {
$response = $this->withSession(['locale' => 'en'])
->get('/impressum');
$response->assertSuccessful();
expect(app()->getLocale())->toBe('en');
});
it('clears invalid session locale', function () {
$this->withSession(['locale' => '-1 or 5*5=25 --'])
->get('/impressum');
expect(session('locale'))->toBeNull();
});