fix
CI/CD / preconditions (pull_request) Successful in 2s
Native JavaScript checks / Native launcher and release tests (pull_request) Successful in 59s
CI/CD / Publish immutable image (pull_request) Canceled after 0s
CI/CD / test_and_check_app (pull_request) Canceled after 4m37s
macOS checks / Native Rust tests and unsigned build (pull_request) Canceled after 0s

This commit is contained in:
2026-09-30 11:53:42 +02:00
parent ce36060ba1
commit 1a022c257f
2 changed files with 0 additions and 40 deletions
-1
View File
@@ -9,7 +9,6 @@ on:
pull_request:
branches:
- main
- fix/dependency-cves
permissions:
contents: read
-39
View File
@@ -1,39 +0,0 @@
<?php
namespace Tests\Unit;
use League\Flysystem\CorruptedPathDetected;
use League\Flysystem\WhitespacePathNormalizer;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
class FilesystemPathSecurityTest extends TestCase
{
#[DataProvider('corruptedPaths')]
public function test_corrupted_paths_are_rejected(string $path): void
{
$this->expectException(CorruptedPathDetected::class);
(new WhitespacePathNormalizer)->normalizePath($path);
}
/**
* @return array<string, array{string}>
*/
public static function corruptedPaths(): array
{
return [
'control character' => ["avatars/user\x00.svg"],
'malformed UTF-8' => ["avatars/user\xFF.svg"],
'control character hidden by malformed UTF-8' => ["avatars/user\xFF\x00.svg"],
];
}
public function test_valid_unicode_paths_remain_supported(): void
{
$this->assertSame(
'avatars/benützer.svg',
(new WhitespacePathNormalizer)->normalizePath('./avatars//benützer.svg'),
);
}
}