mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 08:11:13 -05:00
Fix security vulnerabilities
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { serve } from 'https://deno.land/std@0.168.0/http/server.ts';
|
||||
import { createClient } from 'https://esm.sh/@supabase/supabase-js@2.57.4';
|
||||
import { sanitizeError } from '../_shared/errorSanitizer.ts';
|
||||
|
||||
const corsHeaders = {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
@@ -278,9 +279,10 @@ serve(async (req) => {
|
||||
|
||||
} catch (error) {
|
||||
console.error('[Export] Error:', error);
|
||||
const sanitized = sanitizeError(error, 'export-user-data');
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
error: error instanceof Error ? error.message : 'An unexpected error occurred',
|
||||
...sanitized,
|
||||
success: false
|
||||
}),
|
||||
{ status: 500, headers: { ...corsHeaders, 'Content-Type': 'application/json' } }
|
||||
|
||||
Reference in New Issue
Block a user