mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Update handling of filePath argument
This commit is contained in:
parent
fd38a22c4f
commit
ca9c0471b6
@ -3,9 +3,10 @@
|
|||||||
require '../../includes/csrf.php';
|
require '../../includes/csrf.php';
|
||||||
require_once '../../includes/config.php';
|
require_once '../../includes/config.php';
|
||||||
|
|
||||||
$filePath = $_GET['filePath'];
|
$tempDir = sys_get_temp_dir();
|
||||||
|
$filePath = $tempDir . DIRECTORY_SEPARATOR . RASPI_DEBUG_LOG;
|
||||||
|
|
||||||
if (isset($filePath) && strpos($filePath, RASPI_DEBUG_LOG) !== false) {
|
if (isset($filePath)) {
|
||||||
header('Content-Type: application/octet-stream');
|
header('Content-Type: application/octet-stream');
|
||||||
header('Content-Disposition: attachment; filename='.basename($filePath));
|
header('Content-Disposition: attachment; filename='.basename($filePath));
|
||||||
header('Expires: 0');
|
header('Expires: 0');
|
||||||
|
@ -270,8 +270,7 @@ function setDHCPToggles(state) {
|
|||||||
$('#debugModal').on('shown.bs.modal', function (e) {
|
$('#debugModal').on('shown.bs.modal', function (e) {
|
||||||
var csrfToken = $('meta[name=csrf_token]').attr('content');
|
var csrfToken = $('meta[name=csrf_token]').attr('content');
|
||||||
$.post('ajax/system/sys_debug.php',{'csrf_token': csrfToken},function(data){
|
$.post('ajax/system/sys_debug.php',{'csrf_token': csrfToken},function(data){
|
||||||
var filePath = JSON.parse(data);
|
window.location.replace('/ajax/system/sys_get_logfile.php');
|
||||||
window.location.replace('/ajax/system/sys_get_logfile.php?filePath='+filePath);
|
|
||||||
$('#debugModal').modal('hide');
|
$('#debugModal').modal('hide');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user