mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Base64 encode logs
This commit is contained in:
@@ -33,7 +33,6 @@ use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
@@ -76,7 +75,7 @@ class EditController extends Controller
|
||||
$billPeriods = config('firefly.bill_periods');
|
||||
|
||||
foreach ($billPeriods as $current) {
|
||||
$periods[$current] = (string) trans('firefly.' . $current);
|
||||
$periods[$current] = (string) trans('firefly.'.$current);
|
||||
}
|
||||
|
||||
$subTitle = (string) trans('firefly.edit_bill', ['name' => $bill->name]);
|
||||
@@ -148,6 +147,4 @@ class EditController extends Controller
|
||||
|
||||
return $redirect;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -122,23 +122,20 @@ abstract class Controller extends BaseController
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array|null $files
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function auditLogAttachmentInfo(?array $files): void
|
||||
{
|
||||
if (null === $files) {
|
||||
Log::channel('audit')->info('No files found');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var int $index
|
||||
* @var UploadedFile $file
|
||||
*/
|
||||
foreach ($files as $index => $file) {
|
||||
Log::channel('audit')->info(sprintf('File [%d/%d] upload attachment "%s", content is: "%s".', $index + 1, count($files), $file->getClientOriginalName(), $file->getContent()));
|
||||
Log::channel('audit')->info(sprintf('File [%d/%d] upload attachment "%s", content is: "%s".', $index + 1, count($files), $file->getClientOriginalName(),base64_encode($file->getContent())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user