mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 04:50:47 -07:00
Merge pull request #507 from SysVoid/patch-4
+backup directory check, -closing PHP tag.
This commit is contained in:
commit
747c79d649
1 changed files with 5 additions and 2 deletions
|
@ -5,6 +5,11 @@ session_start();
|
||||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||||
$backup = $_GET['backup'];
|
$backup = $_GET['backup'];
|
||||||
|
|
||||||
|
// Check if the backup exists
|
||||||
|
if (!file_exists($backup)) {
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
// Data
|
// Data
|
||||||
if ($_SESSION['user'] == 'admin') {
|
if ($_SESSION['user'] == 'admin') {
|
||||||
header('Content-type: application/gzip');
|
header('Content-type: application/gzip');
|
||||||
|
@ -19,5 +24,3 @@ if ((!empty($_SESSION['user'])) && ($_SESSION['user'] != 'admin')) {
|
||||||
header("X-Accel-Redirect: /backup/" . $backup);
|
header("X-Accel-Redirect: /backup/" . $backup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue