mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-19 02:52:44 +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\Contracts\View\View;
|
||||||
use Illuminate\Http\RedirectResponse;
|
use Illuminate\Http\RedirectResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Http\UploadedFile;
|
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -76,7 +75,7 @@ class EditController extends Controller
|
|||||||
$billPeriods = config('firefly.bill_periods');
|
$billPeriods = config('firefly.bill_periods');
|
||||||
|
|
||||||
foreach ($billPeriods as $current) {
|
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]);
|
$subTitle = (string) trans('firefly.edit_bill', ['name' => $bill->name]);
|
||||||
@@ -148,6 +147,4 @@ class EditController extends Controller
|
|||||||
|
|
||||||
return $redirect;
|
return $redirect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -122,23 +122,20 @@ abstract class Controller extends BaseController
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array|null $files
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function auditLogAttachmentInfo(?array $files): void
|
protected function auditLogAttachmentInfo(?array $files): void
|
||||||
{
|
{
|
||||||
if (null === $files) {
|
if (null === $files) {
|
||||||
Log::channel('audit')->info('No files found');
|
Log::channel('audit')->info('No files found');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int $index
|
* @var int $index
|
||||||
* @var UploadedFile $file
|
* @var UploadedFile $file
|
||||||
*/
|
*/
|
||||||
foreach ($files as $index => $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