mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 04:31:13 -05:00
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.
This commit is contained in:
@@ -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.');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user