From f257c139312002e38468012137f93eb8230cec38 Mon Sep 17 00:00:00 2001 From: jim-p Date: Mon, 27 Jun 2011 14:42:25 -0400 Subject: Don't do a csrf check when downloading packet capture, see http://forum.pfsense.org/index.php/topic,37794.0.html - also exit after sending the file to the user to avoid partial broken page loads after downloading a packet capture. --- usr/local/www/diag_packet_capture.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'usr') diff --git a/usr/local/www/diag_packet_capture.php b/usr/local/www/diag_packet_capture.php index 2ffba1d..df482e2 100644 --- a/usr/local/www/diag_packet_capture.php +++ b/usr/local/www/diag_packet_capture.php @@ -35,6 +35,9 @@ ##|*MATCH=diag_packet_capture.php* ##|-PRIV +if ($_POST['downloadbtn'] == gettext("Download Capture")) + $nocsrf = true; + $pgtitle = array(gettext("Diagnostics"), gettext("Packet Capture")); require_once("guiconfig.inc"); require_once("pfsense-utils.inc"); @@ -92,6 +95,7 @@ if ($_POST) { header("Content-Disposition: attachment; filename=$fn"); header("Content-Length: $fs"); readfile($fp.$fn); + exit; } } else { $do_tcpdump = false; -- cgit v1.1