feat: implement short-lived grant system for OTP verification and enhance rate limiting across authentication endpoints

This commit is contained in:
hamed
2026-06-20 12:51:10 +03:30
parent f9678026a8
commit e2636ce743
11 changed files with 396 additions and 107 deletions
@@ -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();
+1 -1
View File
@@ -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