Commit 6921c6af authored by Leigh B Stoller's avatar Leigh B Stoller

Check path to make sure not a directory.

parent bdf7043d
...@@ -531,6 +531,9 @@ elsif (! $isadmin) { ...@@ -531,6 +531,9 @@ elsif (! $isadmin) {
UserError("Path: Invalid Path"); UserError("Path: Invalid Path");
} }
} }
if (-d $newimageid_args{"path"}) {
UserError("Path: invalid path, its a directory");
}
# We allow loadpart=0 for whole-disk images in the Long Form, and it uses the # We allow loadpart=0 for whole-disk images in the Long Form, and it uses the
# same table_regex checking patterns. Here "wholedisk" is a separate checkbox. # same table_regex checking patterns. Here "wholedisk" is a separate checkbox.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment