mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-21 19:49:54 +00:00
Disable the encryption of uploads, in line with other efforts not to encrypt local data.
This commit is contained in:
@@ -243,10 +243,10 @@ class ImportJobRepository implements ImportJobRepositoryInterface
|
||||
{
|
||||
// this will overwrite all transactions currently in the job.
|
||||
$disk = Storage::disk('upload');
|
||||
$filename = sprintf('%s-%s.crypt.json', $job->created_at->format('Ymd'), $job->key);
|
||||
$filename = sprintf('%s-%s.json', $job->created_at->format('Ymd'), $job->key);
|
||||
$array = [];
|
||||
if ($disk->exists($filename)) {
|
||||
$json = Crypt::decrypt($disk->get($filename));
|
||||
$json = $disk->get($filename);
|
||||
$array = json_decode($json, true);
|
||||
}
|
||||
if (false === $array) {
|
||||
@@ -329,8 +329,8 @@ class ImportJobRepository implements ImportJobRepositoryInterface
|
||||
{
|
||||
// this will overwrite all transactions currently in the job.
|
||||
$disk = Storage::disk('upload');
|
||||
$filename = sprintf('%s-%s.crypt.json', $job->created_at->format('Ymd'), $job->key);
|
||||
$json = Crypt::encrypt(json_encode($transactions));
|
||||
$filename = sprintf('%s-%s.json', $job->created_at->format('Ymd'), $job->key);
|
||||
$json = json_encode($transactions);
|
||||
|
||||
// set count for easy access
|
||||
$array = ['count' => count($transactions)];
|
||||
@@ -389,9 +389,8 @@ class ImportJobRepository implements ImportJobRepositoryInterface
|
||||
$attachment->size = strlen($content);
|
||||
$attachment->uploaded = false;
|
||||
$attachment->save();
|
||||
$encrypted = Crypt::encrypt($content);
|
||||
|
||||
$this->uploadDisk->put($attachment->fileName(), $encrypted);
|
||||
$this->uploadDisk->put($attachment->fileName(), $content);
|
||||
$attachment->uploaded = true; // update attachment
|
||||
$attachment->save();
|
||||
|
||||
@@ -446,8 +445,7 @@ class ImportJobRepository implements ImportJobRepositoryInterface
|
||||
}
|
||||
|
||||
$content = $fileObject->fread($file->getSize());
|
||||
$encrypted = Crypt::encrypt($content);
|
||||
$this->uploadDisk->put($attachment->fileName(), $encrypted);
|
||||
$this->uploadDisk->put($attachment->fileName(), $content);
|
||||
$attachment->uploaded = true; // update attachment
|
||||
$attachment->save();
|
||||
|
||||
|
Reference in New Issue
Block a user