Skip to content

Commit

Permalink
Correct alert download behavior.
Browse files Browse the repository at this point in the history
  • Loading branch information
renaudholcombe committed Jul 16, 2017
1 parent c3da76b commit 57f0d40
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -385,15 +385,13 @@ function snort_match_filter_field($flent, $fields) {
header("Cache-Control: private, must-revalidate");
}
header("Content-Type: application/octet-stream");
header("Content-length: filesize=" . filesize("{$g['tmp_path']}/{$file_name}"));
header("Content-length: " . filesize("{$g['tmp_path']}/{$file_name}"));
header("Content-disposition: attachment; filename=" . $file_name);
ob_end_clean(); //important or other post will fail
readfile("{$g['tmp_path']}/{$file_name}");

// Clean up the temp file
unlink_if_exists("{$g['tmp_path']}/{$file_name}");
header("Location: /snort/snort_alerts.php?instance={$instanceid}");
exit;
}
else
$savemsg = gettext("An error occurred while creating archive");
Expand Down

0 comments on commit 57f0d40

Please sign in to comment.