diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-07-11 10:44:49 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-07-11 13:38:11 +0200 |
commit | 7c6ca00e61c42bb7c43cbb7a3203d8bad5c0ed0e (patch) | |
tree | 73c035817fc9a1b4b8a660580412c34bff945b32 /solenv | |
parent | bd394492c165d27c96a44495d9ca694a242acb8f (diff) |
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 <Michael.Stahl@cib.de>
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/bin/modules/installer/filelists.pm | 11 |
1 files changed, 11 insertions, 0 deletions
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); } |