implemented a lot of security measures

This commit is contained in:
Codex Agent
2025-12-09 20:29:32 +01:00
parent 4bdb93c171
commit 928d28fcaf
21 changed files with 953 additions and 134 deletions

View File

@@ -30,8 +30,10 @@ class BackfillThumbnails extends Command
$destRel = "events/{$r->event_id}/photos/thumbs/{$baseName}_thumb.jpg";
$made = ImageHelper::makeThumbnailOnDisk('public', $orig, $destRel, 640, 82);
if ($made) {
$url = Storage::url($made);
DB::table('photos')->where('id', $r->id)->update(['thumbnail_path' => $url, 'updated_at' => now()]);
DB::table('photos')->where('id', $r->id)->update([
'thumbnail_path' => $made,
'updated_at' => now(),
]);
$count++;
$this->line("Photo {$r->id}: thumb created");
}
@@ -50,4 +52,3 @@ class BackfillThumbnails extends Command
return null;
}
}