Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug #7674 - Issue Downloading Snort Alert Log Download #374

Merged
merged 1 commit into from
Jul 31, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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