diff options
author | Renato Botelho <renato@netgate.com> | 2017-07-05 13:21:56 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-07-05 13:21:56 -0300 |
commit | 2bf67a6fe9e507e442f6894c78726047cf2d552a (patch) | |
tree | 379d52898dd040c20fa05f6402472b65e84ea080 /src/usr/local/www/crash_reporter.php | |
parent | d49ad309f9006440cb81f5c8ff8990bf9325a92b (diff) | |
download | pfsense-2bf67a6fe9e507e442f6894c78726047cf2d552a.zip pfsense-2bf67a6fe9e507e442f6894c78726047cf2d552a.tar.gz |
Send uniqueid instead of UUID on user-agent
Diffstat (limited to 'src/usr/local/www/crash_reporter.php')
-rw-r--r-- | src/usr/local/www/crash_reporter.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/usr/local/www/crash_reporter.php b/src/usr/local/www/crash_reporter.php index 101939f..9d474ce 100644 --- a/src/usr/local/www/crash_reporter.php +++ b/src/usr/local/www/crash_reporter.php @@ -29,11 +29,13 @@ require_once("guiconfig.inc"); require_once("functions.inc"); require_once("captiveportal.inc"); +require_once("system.inc"); define("FILE_SIZE", 450000); function upload_crash_report($files) { - global $g; + global $g, $config; + $post = array(); $counter = 0; foreach ($files as $file) { @@ -45,7 +47,11 @@ function upload_crash_report($files) { curl_setopt($ch, CURLOPT_VERBOSE, 0); curl_setopt($ch, CURLOPT_SAFE_UPLOAD, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . $g['product_version']); + if (!isset($config['system']['do_not_send_uniqueid'])) { + curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . $g['product_version'] . ' : ' . system_get_uniqueid()); + } else { + curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . $g['product_version']); + } curl_setopt($ch, CURLOPT_URL, $g['crashreporterurl']); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); |