feat: implement short-lived grant system for OTP verification and enhance rate limiting across authentication endpoints
This commit is contained in:
@@ -22,7 +22,7 @@ class SecurityHeadersSubscriber implements EventSubscriberInterface
|
||||
$response->headers->set('Permissions-Policy', 'geolocation=(), microphone=(), camera=()');
|
||||
|
||||
if ($event->getRequest()->isSecure()) {
|
||||
$response->headers->set('Strict-Transport-Security', 'max-age=31536000; includeSubDomains');
|
||||
$response->headers->set('Strict-Transport-Security', 'max-age=63072000; includeSubDomains');
|
||||
}
|
||||
|
||||
$path = $event->getRequest()->getPathInfo();
|
||||
|
||||
@@ -62,7 +62,7 @@ class FileValidatorService
|
||||
throw new AppException(ErrorCodes::ERR_FILE_001, null, 422);
|
||||
}
|
||||
|
||||
return $safeName;
|
||||
return bin2hex(random_bytes(16)) . '.' . $ext;
|
||||
}
|
||||
|
||||
public function detectMimeType(string $filePath): string
|
||||
|
||||
Reference in New Issue
Block a user