Analyse: Runner-Auftrag begrenzt Datenschutz-Angaben
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
62f196f705
commit
696f17b470
2 files changed
+25
-6
No files matched your search
@@ -713,14 +713,17 @@ async function buildAnalytics(project) {
|
||||
} catch (err) {
|
||||
if (err.status !== 404) throw err
|
||||
}
|
||||
const company = String(customer?.companyName || customer?.name || '').trim()
|
||||
const email = String(customer?.email || '').trim()
|
||||
if (!company || !email) {
|
||||
console.warn(`[previewDeploy] Analyse fuer Projekt ${project.$id} uebersprungen: Firma oder E-Mail fehlt`)
|
||||
const clean = (v) => String(v ?? '').replace(/[\x00-\x1f\x7f]/g, ' ').replace(/\s+/g, ' ').trim()
|
||||
const company = clean(customer?.companyName || customer?.name).slice(0, 200).trim()
|
||||
const email = clean(customer?.email)
|
||||
if (!company || !email || email.length > 200 || !email.includes('@')) {
|
||||
console.warn(`[previewDeploy] Analyse fuer Projekt ${project.$id} uebersprungen: Firma oder E-Mail fehlt/ungueltig`)
|
||||
return null
|
||||
}
|
||||
const address = [String(customer.street || '').trim(), `${customer.postalCode || ''} ${customer.city || ''}`.trim()].filter(Boolean).join(', ')
|
||||
return { siteKey: feature.siteKey, color: feature.accentColor || '#111111', privacy: { company, address, email } }
|
||||
const address = [clean(customer.street), clean(`${customer.postalCode || ''} ${customer.city || ''}`)].filter(Boolean).join(', ').slice(0, 300).trim()
|
||||
const stored = String(feature.accentColor || '').toLowerCase()
|
||||
const color = /^#[0-9a-f]{6}$/.test(stored) ? stored : '#111111'
|
||||
return { siteKey: feature.siteKey, color, privacy: { company, address, email } }
|
||||
} catch (err) {
|
||||
console.warn(`[previewDeploy] Analyse-Abfrage fuer Projekt ${project?.$id} fehlgeschlagen: ${err.message}`)
|
||||
return null
|
||||
|
||||
Reference in new issue
Block a user