From 2effff2e49e54d00f0bf21402940083662a4452b Mon Sep 17 00:00:00 2001 From: Massimiliano Arione Date: Wed, 17 Sep 2025 09:24:23 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20decode=20strictly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/File/FileInjector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/File/FileInjector.php b/src/File/FileInjector.php index ae6ba7b..b41d98e 100644 --- a/src/File/FileInjector.php +++ b/src/File/FileInjector.php @@ -10,7 +10,7 @@ public static function getFile(string $file, string $data, string $ext, string $ { $name = 'file_'.$file.'.'.$ext; $path = \tempnam(\sys_get_temp_dir(), 'sf_test_').$name; - \file_put_contents($path, \str_starts_with($mime, 'text') ? $data : \base64_decode($data)); + \file_put_contents($path, \str_starts_with($mime, 'text') ? $data : \base64_decode($data, true)); return new UploadedFile($path, $name, $mime, null, $fixture); }