mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Avoid directory traversal on restorefullbackup
This commit is contained in:
parent
b67cdd05ab
commit
5de32d520b
@ -59,9 +59,9 @@ if($_GET['backupnow'])
|
||||
mwexec_bg("/etc/rc.create_full_backup");
|
||||
|
||||
if($_GET['downloadbackup']) {
|
||||
$filename = $_GET['downloadbackup'];
|
||||
$filename = basename($_GET['downloadbackup']);
|
||||
$path = "/root/{$filename}";
|
||||
if(file_exists("/root/{$filename}")) {
|
||||
if(file_exists($path)) {
|
||||
session_write_close();
|
||||
ob_end_clean();
|
||||
session_cache_limiter('public');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user