$tainted_val =~ /^($RE_filename_relative)\s+($RE_filename_relative)$/
or fatal("invalid parameters for symlink command: $tainted_val",
1,$directive_file_contents);
- my ($target,$link) = ($1,$2); # so far so good
- fatal("invalid parameters for symlink command(2): $tainted_val",
- 1,$directive_file_contents)
- if ($target =~ /\.\./ || $link =~ /\.\./);
- $info{"symlink-$target"} = {"link" => $link, "order" => $cnt++}; #ok.
+ # $1 -- link target $2 -- link name
+ $info{"symlink-$1"} = {"link" => $2, "order" => $cnt++}; #ok.
} elsif ($tainted_cmd =~ /^rmsymlink:?$/i) {
$tainted_val =~ /^($RE_filename_relative)$/
or fatal("invalid parameters for rmsymlink command: $tainted_val",
1,$directive_file_contents);
- my $val = $1; # so far so good
- fatal("invalid parameters for rmsymlink command(2): $tainted_val",
- 1,$directive_file_contents)
- if ($val =~ /\.\./);
$info{"rmsymlink-$1"} = {"order" => $cnt++}; #ok.
} elsif ($tainted_cmd =~ /^archive:?$/i) {
$tainted_val =~ /^($RE_filename_relative)$/
or fatal("invalid parameters for archive command: $tainted_val",
1,$directive_file_contents);
- my $val = $1; # so far so good
- fatal("invalid parameters for archive command(2): $tainted_val",
- 1,$directive_file_contents)
- if ($val =~ /\.\./);
$info{"archive-$1"} = {"order" => $cnt++}; #ok.
} elsif ($tainted_cmd =~ /^replace:?$/i) {
# This command is only supported from v1.2