diff --git a/web/ajax/event.php b/web/ajax/event.php index 9d8a85438..4eed2e832 100644 --- a/web/ajax/event.php +++ b/web/ajax/event.php @@ -71,7 +71,7 @@ if ( canView( 'Events' ) ) { $exportIds = !empty($_REQUEST['eids'])?$_REQUEST['eids']:$_REQUEST['id']; if ( $exportFile = exportEvents( $exportIds, $exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc, $exportFormat ) ) - ajaxResponse( array( 'exportFile'=>$exportFile ) ); + ajaxResponse( array( 'exportFormat'=>$exportFormat ) ); else ajaxError( 'Export Failed' ); break; diff --git a/web/includes/functions.php b/web/includes/functions.php index 2a024fe5a..4aea38a60 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -55,6 +55,7 @@ function CSPHeaders($view, $nonce) { case 'donate': case 'download': case 'error': + case 'export': case 'function': case 'log': case 'logout': diff --git a/web/skins/classic/views/export.php b/web/skins/classic/views/export.php index 0565f6231..d1b5d0413 100644 --- a/web/skins/classic/views/export.php +++ b/web/skins/classic/views/export.php @@ -38,6 +38,13 @@ if ( isset($_SESSION['export']) ) { $_REQUEST['exportFormat'] = $_SESSION['export']['format']; } +if (isset($_REQUEST['exportFormat'])) { + if (!in_array($_REQUEST['exportFormat'], array('zip', 'tar'))) { + Error('Invalid exportFormat'); + return; + } +} + $focusWindow = true; xhtmlHeaders(__FILE__, translate('Export') ); @@ -97,7 +104,7 @@ if ( !empty($_REQUEST['eid']) ) { - + -