mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
crashreporter, limit filesize for upload. closes https://github.com/opnsense/core/issues/1924
This commit is contained in:
parent
4a46cc8830
commit
7e85ffa6c6
@ -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));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user