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:
Stefan Schantl
2023-08-01 17:48:38 +02:00
committed by Michael Tremer
parent 65dc35dcf4
commit 19a3b883de

View File

@@ -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);