chore: add serializable_classes security option to cache config
This commit is contained in:
@@ -114,4 +114,23 @@ return [
|
|||||||
|
|
||||||
'prefix' => env('CACHE_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-cache-'),
|
'prefix' => env('CACHE_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-cache-'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Serializable Classes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls which PHP classes may be unserialized when retrieving
|
||||||
|
| cached values. Setting this to `false` prevents unserialization of any
|
||||||
|
| objects, hardening your cache against PHP deserialization attacks.
|
||||||
|
|
|
||||||
|
| If your application caches PHP objects, list allowed classes explicitly:
|
||||||
|
|
|
||||||
|
| 'serializable_classes' => [
|
||||||
|
| App\Data\CachedDashboardStats::class,
|
||||||
|
| ],
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'serializable_classes' => false,
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user