forked from GNUsocial/gnu-social
		
	[CORE] Unset sensitive information from the environment
This commit is contained in:
		@@ -33,6 +33,7 @@ declare(strict_types = 1);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use App\CacheKernel;
 | 
					use App\CacheKernel;
 | 
				
			||||||
use App\Kernel;
 | 
					use App\Kernel;
 | 
				
			||||||
 | 
					use App\Util\Formatting;
 | 
				
			||||||
use Symfony\Component\ErrorHandler\Debug;
 | 
					use Symfony\Component\ErrorHandler\Debug;
 | 
				
			||||||
use Symfony\Component\HttpFoundation\Request;
 | 
					use Symfony\Component\HttpFoundation\Request;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -69,6 +70,11 @@ if ('prod' === $kernel->getEnvironment() || isset($_ENV['SOCIAL_USE_CACHE_KERNEL
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$request = Request::createFromGlobals();
 | 
					$request = Request::createFromGlobals();
 | 
				
			||||||
 | 
					$_ENV    = array_filter(
 | 
				
			||||||
 | 
					    $_ENV,
 | 
				
			||||||
 | 
					    fn (string $key) => Formatting::startsWith($key, ['HTTP', 'APP']) && $key !== 'APP_SECRET',
 | 
				
			||||||
 | 
					    \ARRAY_FILTER_USE_KEY,
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
$response = $kernel->handle($request);
 | 
					$response = $kernel->handle($request);
 | 
				
			||||||
$response->send();
 | 
					$response->send();
 | 
				
			||||||
$kernel->terminate($request, $response);
 | 
					$kernel->terminate($request, $response);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user