summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-06-27 14:42:25 -0400
committerjim-p <jimp@pfsense.org>2011-06-27 14:42:25 -0400
commitf257c139312002e38468012137f93eb8230cec38 (patch)
treebb4249d2715a4eed2b2ac415bbd967da131bbf45 /usr
parent2f3554bba15ceabca965aabb6c9cc3b4e33e88d4 (diff)
downloadpfsense-f257c139312002e38468012137f93eb8230cec38.zip
pfsense-f257c139312002e38468012137f93eb8230cec38.tar.gz
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.
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/diag_packet_capture.php4
1 files changed, 4 insertions, 0 deletions
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;
OpenPOWER on IntegriCloud