From 714a1707cea21e79024108ba1fe63f8f7a7edac4 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 8 Nov 2025 00:47:55 +0000 Subject: [PATCH] Fix photo upload ban evasion reporting Implement ban evasion reporting for the photo upload component to ensure consistency with other submission types. This change adds a call to `reportBanEvasionAttempt` when a banned user attempts to upload photos, logging the incident to system alerts. --- src/components/upload/UppyPhotoSubmissionUpload.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/upload/UppyPhotoSubmissionUpload.tsx b/src/components/upload/UppyPhotoSubmissionUpload.tsx index 8e9ab74b..c3bec629 100644 --- a/src/components/upload/UppyPhotoSubmissionUpload.tsx +++ b/src/components/upload/UppyPhotoSubmissionUpload.tsx @@ -21,6 +21,7 @@ import { logger } from "@/lib/logger"; import { breadcrumb } from "@/lib/errorBreadcrumbs"; import { checkSubmissionRateLimit, recordSubmissionAttempt } from "@/lib/submissionRateLimiter"; import { sanitizeErrorMessage } from "@/lib/errorSanitizer"; +import { reportBanEvasionAttempt } from "@/lib/pipelineAlerts"; /** * Photo upload pipeline configuration @@ -140,6 +141,10 @@ export function UppyPhotoSubmissionUpload({ ); if (profile?.banned) { + // Report ban evasion attempt + reportBanEvasionAttempt(user.id, 'photo_upload').catch(() => { + // Non-blocking - don't fail if alert fails + }); throw new Error('Account suspended. Contact support for assistance.'); }