Skip to content

Commit 747c79d

Browse files
committed
Merge pull request hestiacp#507 from SysVoid/patch-4
+backup directory check, -closing PHP tag.
2 parents bca6e7f + 4df23ad commit 747c79d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

web/download/backup/index.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
66
$backup = $_GET['backup'];
77

8+
// Check if the backup exists
9+
if (!file_exists($backup)) {
10+
exit(0);
11+
}
12+
813
// Data
914
if ($_SESSION['user'] == 'admin') {
1015
header('Content-type: application/gzip');
@@ -19,5 +24,3 @@
1924
header("X-Accel-Redirect: /backup/" . $backup);
2025
}
2126
}
22-
23-
?>

0 commit comments

Comments
 (0)