You've already forked Atomcms-edit
Fix security, performance, and code quality issues across CMS
Security:
- Replace unescaped {!! !!} with Purify::clean() in 15+ Blade templates (XSS)
- Add rate limiting to register (3/hr), upload (10/min), SSE (6/min)
- Add max:5000 validation on article comments
- Remove duplicate exception handler callback
Hardcoded paths:
- Replace ~44 /var/www/ hardcoded paths with env() configs
- CatalogService (13), AutoDetectService (18), Commandocentrum (11), AppServiceProvider (2)
Performance:
- Add 10 missing database indexes (radio_song_requests, help_center_tickets, etc.)
- Replace Cache::flush() with targeted Cache::forget() in RadioSettings
- Cache getCachedCategories() in TicketController (N+1 fix)
- Remove redundant top-3 leaderboard query
Bug fixes:
- Fix undefined $enabled variable → $isOnline in radio index view
- Add getAvatarAttribute() accessor for non-existent avatar column
- Fix User::guilds() from wrong HasMany to HasManyThrough
Code quality:
- Replace file_get_contents with Http::timeout(10) in TraxService
- Remove commented Echo/Pusher boilerplate in bootstrap.js
- Remove TODO/FIXME comments from logo-generator templates
- Replace hardcoded Turnstile CDN URL with config()
- Restore QUEUE_CONNECTION=redis in .env.example files
This commit is contained in:
@@ -1175,9 +1175,12 @@ final class RadioSettings extends Page implements HasForms
|
||||
);
|
||||
}
|
||||
|
||||
Cache::flush();
|
||||
Cache::forget('radio_settings_*');
|
||||
Cache::forget('radio_ranks');
|
||||
Cache::forget('radio_stream_status');
|
||||
Cache::forget('radio_nowplaying');
|
||||
Cache::forget('radio_listeners');
|
||||
Artisan::call('config:clear');
|
||||
Artisan::call('cache:clear');
|
||||
|
||||
Notification::make()
|
||||
->success()
|
||||
@@ -1264,9 +1267,12 @@ final class RadioSettings extends Page implements HasForms
|
||||
);
|
||||
}
|
||||
|
||||
Cache::flush();
|
||||
Cache::forget('radio_settings_*');
|
||||
Cache::forget('radio_ranks');
|
||||
Cache::forget('radio_stream_status');
|
||||
Cache::forget('radio_nowplaying');
|
||||
Cache::forget('radio_listeners');
|
||||
Artisan::call('config:clear');
|
||||
Artisan::call('cache:clear');
|
||||
|
||||
Notification::make()
|
||||
->success()
|
||||
@@ -1349,9 +1355,12 @@ final class RadioSettings extends Page implements HasForms
|
||||
);
|
||||
}
|
||||
|
||||
Cache::flush();
|
||||
Cache::forget('radio_settings_*');
|
||||
Cache::forget('radio_ranks');
|
||||
Cache::forget('radio_stream_status');
|
||||
Cache::forget('radio_nowplaying');
|
||||
Cache::forget('radio_listeners');
|
||||
Artisan::call('config:clear');
|
||||
Artisan::call('cache:clear');
|
||||
|
||||
Notification::make()
|
||||
->success()
|
||||
@@ -1557,6 +1566,10 @@ final class RadioSettings extends Page implements HasForms
|
||||
private function clearCache(): void
|
||||
{
|
||||
Cache::forget(self::CACHE_KEY);
|
||||
Cache::forget('radio_ranks');
|
||||
Cache::forget('radio_stream_status');
|
||||
Cache::forget('radio_nowplaying');
|
||||
Cache::forget('radio_listeners');
|
||||
}
|
||||
|
||||
private function getSettingBool(string $key): bool
|
||||
|
||||
Reference in New Issue
Block a user