From 7c6ca00e61c42bb7c43cbb7a3203d8bad5c0ed0e Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 11 Jul 2018 10:44:49 +0200 Subject: related: tdf#118571 installer: error out if path contains "//" No point in creating funny MSIs that don't work. (Thanks to bubli for the help with perl) Change-Id: I54aa39ed282e31270de69566656d33b803a73802 Reviewed-on: https://gerrit.libreoffice.org/57266 Tested-by: Jenkins Reviewed-by: Michael Stahl --- solenv/bin/modules/installer/filelists.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'solenv') diff --git a/solenv/bin/modules/installer/filelists.pm b/solenv/bin/modules/installer/filelists.pm index 41d3ea3fd895..2422e7415a6b 100644 --- a/solenv/bin/modules/installer/filelists.pm +++ b/solenv/bin/modules/installer/filelists.pm @@ -19,6 +19,7 @@ sub resolve_filelist_flag { my ($files, $links, $outdir) = @_; my @newfiles = (); + my $error = 0; foreach my $file (@{$files}) { @@ -53,6 +54,11 @@ sub resolve_filelist_flag { installer::logger::print_error("file '$path' is not in '$outdir'"); } + if ($path =~ '\/\/') + { + installer::logger::print_error("file '$path' contains 2 consecutive '/' which breaks MSIs"); + $error = 1; + } if (-l $path) { $is_symlink = 1; @@ -106,6 +112,11 @@ sub resolve_filelist_flag } } + if ( $error ) + { + installer::exiter::exit_program("ERROR: error(s) in resolve_filelist_flag"); + } + return (\@newfiles, $links); } -- cgit v1.2.3