diff --git a/src/www/crash_reporter.php b/src/www/crash_reporter.php
index 05e282382..43323c2c3 100644
--- a/src/www/crash_reporter.php
+++ b/src/www/crash_reporter.php
@@ -41,7 +41,7 @@ function upload_crash_report($files)
$counter = 0;
foreach($files as $filename) {
- if (is_link($filename)) {
+ if (is_link($filename) || $filename == '/var/crash/minfree.gz' || $filename == '/var/crash/bounds.gz') {
continue;
}
$post["file{$counter}"] = curl_file_create($filename, "application/x-gzip", basename($filename));
@@ -69,13 +69,14 @@ include('head.inc');
$last_version = '/usr/local/opnsense/version/opnsense.last';
$crash_report_header = sprintf(
- "System Information:\n%s\n%s %s%s (%s)\n%s\n",
+ "%s\n%s %s%s %s (%s)\nUUID %s\n",
php_uname('v'),
$g['product_name'],
trim(file_get_contents('/usr/local/opnsense/version/opnsense')),
file_exists($last_version) ? sprintf(' [%s]', trim(file_get_contents($last_version))) : '',
+ trim(shell_exec('/usr/local/bin/openssl version')),
php_uname('m'),
- exec('/usr/local/bin/openssl version')
+ shell_exec('/sbin/sysctl -b kern.hostuuid')
);
?>
@@ -95,11 +96,19 @@ $crash_report_header = sprintf(
' . gettext('Processing...');
+ echo '
' . gettext('Processing...'); flush(); if (!is_dir('/var/crash')) { mkdir('/var/crash', 0750, true); } + $email = trim($_POST['Email']); + if (!empty($email)) { + $crash_report_header .= "Email {$email}\n"; + } + $desc = trim($_POST['Desc']); + if (!empty($desc)) { + $crash_report_header .= "Description\n\n{$desc}"; + } file_put_contents('/var/crash/crashreport_header.txt', $crash_report_header); @rename('/tmp/PHP_errors.log', '/var/crash/PHP_errors.log'); @copy('/var/run/dmesg.boot', '/var/crash/dmesg.boot'); @@ -116,7 +125,7 @@ $crash_report_header = sprintf( } if (get_crash_report(true) == '') { - echo '
';
+ echo ' ';
if (isset($_POST['Submit']) && $_POST['Submit'] == 'yes') {
echo gettext('Thank you for submitting this crash report.');
} elseif ($_POST['Submit'] == 'no') {
@@ -127,29 +136,31 @@ $crash_report_header = sprintf(
echo ' " . gettext("Unfortunately we have detected at least one programming bug.") . " " . gettext("Unfortunately we have detected at least one programming bug.") . " " . gettext("Would you like to submit this crash report to the developers?") . " ";
echo "
" . sprintf(gettext("Would you like to submit this crash report to the %s developers?"), $g['product_name']) . "
" . gettext("Please-double check the contents to ensure you are comfortable submitting the following information:") . "
" . gettext("You can help us further by optionally adding your contact information and a problem description.") . "
"; + echo ""; + echo ""; + echo "" . gettext("Please double-check the following contents to ensure you are comfortable submitting the following information.") . "
"; + foreach ($crash_reports as $report => $content) { + echo "{$report}:
{$content}";
+ }
}
?>