mirror of
https://github.com/webmin/webmin.git
synced 2026-05-16 03:40:26 +01:00
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
* Note: Validate File Manager action name/file parameters as checked paths under the current directory and `allowed_paths` before operations, blocking traversal and symlink escapes.
25 lines
447 B
Perl
Executable File
25 lines
447 B
Perl
Executable File
#!/usr/local/bin/perl
|
|
|
|
require './filemin-lib.pl';
|
|
&ReadParse();
|
|
|
|
get_paths();
|
|
|
|
my @names = split(/\0/, $in{'name'});
|
|
foreach $name (@names) {
|
|
&validate_filename_path($name);
|
|
}
|
|
|
|
open(my $fh, ">", &get_paste_buffer_file()) or die "Error: $!";
|
|
print $fh "cut\n";
|
|
print $fh "$path\n";
|
|
#$info = "Copied ".scalar(@list)." files to buffer";
|
|
|
|
foreach $name (@names) {
|
|
print $fh "$name\n";
|
|
}
|
|
|
|
close($fh);
|
|
|
|
&redirect("index.cgi?path=".&urlize($path));
|