Commit 5084433c authored by Leigh Stoller's avatar Leigh Stoller

Do not allow datasets to be downloaded via this path unless they

are marked global. Dataset download is otherwise handled via the
CM with credentials.
parent 960e20b0
<?php <?php
# #
# Copyright (c) 2003-2015 University of Utah and the Flux Group. # Copyright (c) 2003-2016 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -92,6 +92,14 @@ $unix_gid = $group->unix_gid(); ...@@ -92,6 +92,14 @@ $unix_gid = $group->unix_gid();
$project = $image->Project(); $project = $image->Project();
$unix_pid = $project->unix_gid(); $unix_pid = $project->unix_gid();
#
# Datasets are special, they cannot be downloaded on this path
# unless they are global.
#
if ($image->isdataset() && !$image->isglobal()) {
SPITERROR(403, "No permission to access image");
}
# #
# We want to support HEAD requests to avoid send the file. # We want to support HEAD requests to avoid send the file.
# #
......
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