From 7e85ffa6c6b9b8da64f987e778d8b72396dad668 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Sun, 12 Nov 2017 19:21:39 +0100 Subject: [PATCH] crashreporter, limit filesize for upload. closes https://github.com/opnsense/core/issues/1924 --- src/www/crash_reporter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/www/crash_reporter.php b/src/www/crash_reporter.php index 2db432484..12e950549 100644 --- a/src/www/crash_reporter.php +++ b/src/www/crash_reporter.php @@ -36,7 +36,8 @@ function upload_crash_report($files, $agent) $counter = 0; foreach ($files as $filename) { - if (is_link($filename) || $filename == '/var/crash/minfree.gz' || $filename == '/var/crash/bounds.gz') { + if (is_link($filename) || $filename == '/var/crash/minfree.gz' || $filename == '/var/crash/bounds.gz' + || filesize($filename) > 2097152 ) { continue; } $post["file{$counter}"] = curl_file_create($filename, "application/x-gzip", basename($filename));