mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
extrahd.cgi: Do not allow "/mnt" or "/media" as mount points
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
65dc35dcf4
commit
19a3b883de
@@ -667,6 +667,10 @@ sub is_mounted ($) {
|
||||
sub is_valid_dir ($) {
|
||||
my ($mpoint) = @_;
|
||||
|
||||
# Do not allow "/mnt" or "/media" as mount points.
|
||||
return if($mpoint eq "/mnt");
|
||||
return if($mpoint eq "/media");
|
||||
|
||||
# Split the given mountpoint into pieces and store them
|
||||
# in a temporay array.
|
||||
my @tmp = split("/", $mpoint);
|
||||
|
||||
Reference in New Issue
Block a user