fix: DockerSecretsResolver - don't normalize absolute paths like /var/www/html/...
Some checks failed
Deploy Application / deploy (push) Has been cancelled
Some checks failed
Deploy Application / deploy (push) Has been cancelled
This commit is contained in:
@@ -202,6 +202,7 @@ final readonly class ResponseErrorRenderer implements ErrorRenderer
|
||||
private function getTemplateName(int $statusCode): string
|
||||
{
|
||||
return match ($statusCode) {
|
||||
403 => 'errors/403',
|
||||
404 => 'errors/404',
|
||||
500 => 'errors/500',
|
||||
default => 'errors/error',
|
||||
@@ -437,6 +438,14 @@ HTML;
|
||||
*/
|
||||
private function getHttpStatusCode(\Throwable $exception): int
|
||||
{
|
||||
// Map security exceptions to 403 Forbidden
|
||||
// Check for specific security exceptions first
|
||||
if ($exception instanceof \App\Framework\Exception\Security\CsrfValidationFailedException ||
|
||||
$exception instanceof \App\Framework\Exception\Security\HoneypotTriggeredException ||
|
||||
$exception instanceof \App\Framework\Exception\SecurityException) {
|
||||
return 403;
|
||||
}
|
||||
|
||||
// Use exception code if it's a valid HTTP status code
|
||||
$code = $exception->getCode();
|
||||
if ($code >= 400 && $code < 600) {
|
||||
|
||||
Reference in New Issue
Block a user