Skip to content

armgit / Filee

Public Imported from GitHub
0

Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.

LivePhotoTests: the conversion part of the hostile XMP test needs FFmpeg

KnifeLemon675ab174d83a
diff --git a/tests/Filee.Engines.Tests/LivePhotoTests.cs b/tests/Filee.Engines.Tests/LivePhotoTests.cs
index ae65921b..f5ff3421 100644
--- a/tests/Filee.Engines.Tests/LivePhotoTests.cs
+++ b/tests/Filee.Engines.Tests/LivePhotoTests.cs
@@ -373,6 +373,8 @@ public class LivePhotoTests(EngineFixture fx) : IClassFixture<EngineFixture>
using var hostile = new MemoryStream(JpegWithXmp(jpeg, "<!DOCTYPE x [<!ENTITY leak SYSTEM 'file:///secret'>]><x>&leak;</x>"));
Assert.Throws<System.Xml.XmlException>(() => MotionPhoto.FindVideo(hostile));
+ // Through a conversion (FFmpeg's edge): the user gets the plain message, not the parser's.
+ Tools();
var path = Path.Combine(fx.NewFolder(), "hostile.jpg");
await File.WriteAllBytesAsync(path, hostile.ToArray(), TestContext.Current.CancellationToken);
var job = await fx.ConvertAsync([path], Extract());