From ffa8a1c4e44b78a524efa943f6d0ec78f1aacf64 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Mon, 14 Sep 2015 17:10:56 +0200 Subject: [PATCH] crash reporter: improve previous ALWAYS show the information to be sent! --- src/www/crash_reporter.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/www/crash_reporter.php b/src/www/crash_reporter.php index 2b9286caa..31f03d7b6 100644 --- a/src/www/crash_reporter.php +++ b/src/www/crash_reporter.php @@ -77,6 +77,10 @@ $crash_report_header = sprintf( shell_exec('/sbin/sysctl -b kern.hostuuid') ); +if (isset($_SERVER['HTTP_USER_AGENT'])) { + $crash_report_header .= "User Agent {$_SERVER['HTTP_USER_AGENT']}\n"; +} + $pkgver = explode('-', trim(file_get_contents('/usr/local/opnsense/version/opnsense'))); $user_agent = $g['product_name'] . '/' . $pkgver[0]; $crash_reports = array(); @@ -91,10 +95,6 @@ if (isset($_POST['Submit'])) { if (!empty($email)) { $crash_report_header .= "Email {$email}\n"; } - if (isset($_SERVER["HTTP_USER_AGENT"])) - { - $crash_report_header .= "User Agent " . $_SERVER["HTTP_USER_AGENT"] . "\n"; - } $desc = trim($_POST['Desc']); if (!empty($desc)) { $crash_report_header .= "Description\n\n{$desc}";