Module: tools
Branch: master
Commit: 82e6398fe915ce4a4ef0c86c43c4b9bf8788b8fb
URL: https://source.winehq.org/git/tools.git/?a=commit;h=82e6398fe915ce4a4ef0c86…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Tue Jan 12 18:15:03 2021 +0100
testbot/Engine: Fix attachment support in HandleWinePatchMLSubmission().
By default MIME:Parser::Filer uses the attachement's recommended
filename to save it to disk. However that name is tainted which causes
Perl to throw an exception.
Since we don't actually care about the filename (all mailing list
patches are called 'patch.diff'), simply tell the filer to generate
its own filename.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/Engine.pl | 1 +
1 file changed, 1 insertion(+)
diff --git a/testbot/bin/Engine.pl b/testbot/bin/Engine.pl
index 48bb797..db9d82d 100755
--- a/testbot/bin/Engine.pl
+++ b/testbot/bin/Engine.pl
@@ -428,6 +428,7 @@ sub HandleWinePatchMLSubmission()
# Process the email
my $Parser = new MIME::Parser;
$Parser->output_dir($WorkDir);
+ $Parser->filer->ignore_filename(1);
my $Entity = $Parser->parse_open($FullMessageFileName);
my $ErrMessage = CreatePatches()->NewPatch($Entity);
if (defined $ErrMessage)