fix: validate icons to be images (#1167)

This commit is contained in:
Attila Kerekes
2023-06-05 18:27:30 +02:00
committed by GitHub
parent 7d016cdaa6
commit 5d67f570a9
8 changed files with 74 additions and 1 deletions

View File

@@ -77,6 +77,10 @@ class SettingsController extends Controller
}
if ($setting->type === 'image') {
$validatedData = $request->validate([
'value' => 'image'
]);
if (!$request->hasFile('value')) {
throw new \Exception(
'file_too_big'