mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 10:37:39 -07:00
+backup directory check, -closing PHP tag.
I added a backup directory check (as of now, you can download fake backups). I also removed the closing PHP tag that isn't needed.
This commit is contained in:
parent
8503efa6fe
commit
4df23adb13
1 changed files with 5 additions and 2 deletions
|
@ -5,6 +5,11 @@ session_start();
|
|||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
$backup = $_GET['backup'];
|
||||
|
||||
// Check if the backup exists
|
||||
if (!file_exists($backup)) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
// Data
|
||||
if ($_SESSION['user'] == 'admin') {
|
||||
header('Content-type: application/gzip');
|
||||
|
@ -19,5 +24,3 @@ if ((!empty($_SESSION['user'])) && ($_SESSION['user'] != 'admin')) {
|
|||
header("X-Accel-Redirect: /backup/" . $backup);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue