Skip to content

Firefly III: a personal finances manager

Encrypt more stuff in the cleanup routine [skip ci]

James Cole8a867e71a160
diff --git a/app/Http/Middleware/Cleanup.php b/app/Http/Middleware/Cleanup.php
index 6e332a75c5..a9d00860fd 100644
--- a/app/Http/Middleware/Cleanup.php
+++ b/app/Http/Middleware/Cleanup.php
@@ -229,7 +229,17 @@ class Cleanup
}
unset($set, $entry, $amount);
- //encrypt piggy bank targetamount
+ // encrypt piggy bank targetamount
+ $set = PiggyBank::whereNull('targetamount_encrypted')->take(5)->get();
+ /** @var PiggyBank $entry */
+ foreach ($set as $entry) {
+ $count++;
+ $amount = $entry->targetamount;
+ $entry->targetamount = $amount;
+ $entry->save();
+ }
+ unset($set, $entry, $amount);
+
//encrypt preference name (add field)
//encrypt preference data (add field)
//encrypt transaction amount