We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8503efa commit d5441fdCopy full SHA for d5441fd
1 file changed
web/download/file/index.php
@@ -8,20 +8,16 @@
8
9
$user = $_SESSION['user'];
10
if (($_SESSION['user'] == 'admin') && (!empty($_SESSION['look']))) {
11
- $user=$_SESSION['look'];
+ $user = $_SESSION['look'];
12
}
13
14
-if (!empty($_REQUEST['path'])) {
15
- $path = $_REQUEST['path'];
+$path = $_REQUEST['path'];
+if (!empty($path) && file_exists($path)) {
16
header("Content-type: application/octet-stream");
17
header("Content-Transfer-Encoding: binary");
18
header("Content-disposition: attachment;filename=".basename($path));
19
- passthru (VESTA_CMD . "v-open-fs-file " . $user . " " . escapeshellarg($path));
+ passthru(VESTA_CMD . "v-open-fs-file " . $user . " " . escapeshellarg($path));
20
exit;
21
-}
22
-else {
+} else {
23
die('File not found');
24
25
-
26
27
-?>
0 commit comments